• Resolved litbea

    (@litbea)


    Great plugin, is working great the many times I’ve used it, but I have a question.
    I’m trying to use the Front-end importer with the shortcode [import-users-from-csv-with-meta role=”subscriber”] but, what happens if used with the option that deletes users not present in the CSV file?
    Will the process delete not editors aswell?
    If not, it should be more obvious in the description of the option.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Javier Carazo

    (@carazo)

    @litbea,

    Yes the users not present in the file is those, no the users not presents in the CSV of a chosen role.

    Would you like to do it? How would you explain it in the options?

    Thread Starter litbea

    (@litbea)

    What I meant is that, as it is explained, “Users not present in CSV file – Delete users that are not present in the CSV?” I’m not sure if users from other profiles will be deleted aswell.

    Let’s say I have a site with 2 admins, 2 editors, 4 authors and 500 subscribers. The subscribers are updated from another tool outside WordPress (for example, a CRM, or another platform) and I want to update the list of subscribers. Most of them will be the same (should therefore be “updated”), some of them will be new (should therefore be “created”) and some of them not present anymore in the CSV (should therefore be “deleted”). The CSV file will also NOT include admins, editors, authors or users from other profiles, only subscribers.

    What is not clear in the explanation is this: I can use the shortcode [import-users-from-csv-with-meta role=”subscriber”] or maybe use [import-users-from-csv-with-meta] and do the selection role=”subscriber” in the options section, ok. The problem is, what action is applied to users NOT included in the CSV AND still present in WordPress with other roles? In other words, will the import delete my editors / authors / admins? If this is the case, I would lose all the users belonging to other profiles, which is not great. But is still needed the option to delete subscribers no longer present in the CSV.

    If I’m right, maybe there should be another option to manage this frequent scenario:

    Users not present in CSV file:
    – Delete users that are not present in the CSV?
    – (if role-front != ‘Disable role assignment in frontend import’) Delete users BELONGING TO PROFILE=role-front that are not present in the CSV?

    (this option also makes sense in tools.php?page=acui&tab=homepage and not only in tools.php?page=acui&tab=frontend, of course)

    To sum up: I looks like the role options in your plugin only apply to the users been imported, not to users ALREADY present in WP. During my tests, all the published posts where trashed because ticking “Delete users that are not present in the CSV?” also deleted my authors. It looks natural that, if I select role=subscriber for the import action, only missing users with this role should be deleted, in my opinion.

    Plugin Author Javier Carazo

    (@carazo)

    @litbea,

    Surely you have thought it but many others users has not had problem with it before (this is the first question about it in all the time).

    How would you explain it to make it clear.

    Maybe some option to decide:

    • Delete users not present in CSV
    • Delete users not present in CSV with the same role used in the shortcode

    What do you think?

    Thread Starter litbea

    (@litbea)

    Hi again, Javier, maybe “Delete users not present in CSV with the same role used in the import” so you could reuse the option in the main tab?

    Plugin Author Javier Carazo

    (@carazo)

    @litbea,

    OK let me think how it could be shown in the user interface.

    Sometime the problem is that what you want is something so particular that is complicated to show easily in the UX.

    Plugin Author Javier Carazo

    (@carazo)

    I have just included a new attribute in shortcode:

    [import-users-from-csv-with-meta role="editor" delete-only-specified-role="true"]
    

    It should do what you need. Specify a new attribute is easier than creating a new option.

    We have to unify all this options between standard, cron and frontend import to make it easier to understand.

    Thread Starter litbea

    (@litbea)

    Dear Javier, it’s working great!

    Just a note at https://icapalencia.es/wp-admin/tools.php?page=acui&tab=frontend that may be confusing, in “Users not present in CSV file” section: it should not be possible to tick the “Change role of users that are not present in the CSV?” option if “delete-only-specified-role” is true, don’t you agree?

    A sorry for the delay in the feedback.

    Plugin Author Javier Carazo

    (@carazo)

    @litbea,

    Thanks for the tip.

    I add this as a note to include in future versions to make it more usable.

    Plugin Author Javier Carazo

    (@carazo)

    I have just done it.

    Update and you will get it.

    Thanks for your suggestion.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Users not present in CSV file when using roles’ is closed to new replies.