Admin users disabled on user sync

When importing a CSV containing user data with the "sync" functionality, I've had issues with all admin users other than myself being disabled. Putting "Administrator" in the role field does not appear to be recognized by the import function. Is there a way to either a) sync without modifying users not in the CSV or b) import administrator users?

Comments

  • edited September 2018
    Hi vktec,

    I've taken a look at the sync part of the user import script and it does indeed look like the Administrator role is missing, and therefore gets set to blank on import. As a temporary fix you could add the following lines just above line 495 of /modules/User Admin/import_users.php
    if ($user['role'] == 'Administrator') {
        $role = '001';
    }
    I think for a long-term fix, our plan is to start phasing out those import scripts in favor of the Data Admin imports, which should soon be part of the core. The importer in that module is more robust; it has checks for validating data, can handle additional file formats, and does a dry run before import. If you're looking to sync on a regular basis, it may be worth looking into using Data Admin.

    Hope this helps!
    admin
Sign In or Register to comment.