User preview settings
  • 05 Jul 2023
  • 6 minutes to read

User preview settings


Article Summary

When using Totara's Upload users feature you will be able to preview your upload. Once you have added your upload file you will be taken to the Upload users preview screen, where you can configure a range of settings to better control the upload of your user data.

Errors updating existing accounts can affect your users badly. Be careful when updating user information.

For those seeking a more technical explanation, the process for standardising the usernames consists of ensuring the characters are all UTF-8 (fix_utf8) encoded, converting the username to lowercase, and then stripping out non-letters/non-number characters (unless $CFG->extendedusernamechars is set to true) with something similar to: 

$username = preg_replace('/[^-\.@_a-z0-9]/', '', $username);
SettingDescriptionNotes

Upload type

The Upload type specifies how to handle existing accounts.

  • Add new only, skip existing users: Creates a new user account for each new record in the uploaded file but ignores any existing accounts (the data for existing accounts will not be updated)
  • Add all, append number to usernames if needed: Creates a new user account for each record in the uploaded file, including any existing usernames which are appended with a number
  • Add new and update existing users: Creates a new user account for each new user in the upload file and updates any existing users
  • Update existing users only: Ignores any new users found in the upload file and updates the user account if a matching username record is found in the uploaded file

The default is Add new only, skip existing users.

As an example of the Add all, append number to usernames if needed upload type, if you upload a file with the username 'jsmith', but this user already exists in the system, then this method will create a new account with the username 'jsmith1'. 


New user password

When creating a new user account, Totara can create a new password (if one is not provided) or require a password in the uploaded file. Create password if needed creates a default password for the new user account if one is not provided in the uploaded file. Field required in file requires that a password be provided in the uploaded file in order. If a password is not provided, an error is generated and the user account is not created.

Note that if passwords are created then users will be notified by email. This could result in a very large number of emails being sent if you have a lot of users.

Existing user details

The Existing user details options are only available when the Upload type allows existing user accounts to be updated. It specifies how Totara should process user details information for existing users.

-

No changes

Ignores user details data in the upload and leaves the existing user account data unchanged.

-

Override with file

Overwrites data in the existing user account with the data provided in the uploaded file.

-

Override with file and defaults

Overwrites data in the existing user account with data provided in the uploaded file and fills in the default values for existing user details when no data is provided in the uploaded file.

-

Fill in missing from file and defaults

Adds data in the existing user account with data provided in the uploaded file if the field is empty (does not already contain data), and fills in the default values for existing user details when no data is provided in the uploaded file.

-

Existing user password

The Existing user password option specifies how to handle password data for existing user accounts when Existing user details is set to overwrite data.

-

No changes

Ignores the password field in the uploaded user file and leaves the existing user account password untouched.

-

Update

Overwrites the existing user account password with the password provided in the uploaded file.

-

Force password change

The Force password change option specifies when to tag a user account so that the next login attempt will require the user to change their password.

-

Users having a weak password

If the user account has a weak password (as defined by the site's password policy) then the user will be forced to change the password during the next login attempt. This option is not shown if the site does not have a password policy. In other words, $CFG->passwordpolicy must be set to see this option.

-

None

None of the users in the uploaded file will be forced to change their password during the user's next login attempt.

-

All

All of the users in the uploaded file will be forced to change their password during the user's next login attempt.

-

Allow renames

If the uploaded file contains the oldusername field, it is possible to rename a user from the old username to a new username. 

  • No: Ignores the oldusername field and leaves the existing user account's username field unchanged
  • Yes: Allows the existing user account's username to be changed by the data provided in the uploaded file's username field - the old username will be searched for and then updated with the data provided in the username column

The default setting is to not allow renaming.

Keep in mind that renaming a user will require the user to use the new username when logging in.


Allow deletes

If the uploaded file contains the deleted field, it is possible to use the upload file to delete existing user accounts. 

  • No: Ignores the deleted special field in the uploaded file and leaves the existing user account unchanged
  • Yes: Allows the existing user account to be deleted when the value of the deleted field is 1

The default setting is to not allow deletes. 

Keep in mind that deleting a user account will prevent that user from logging in. Site Administrator user accounts cannot be deleted with this method.

Allow suspending and activating of accounts

If the uploaded file contains the suspended field, it is possible to use the upload file to either suspend or reactivate (unsuspend) existing user accounts. 

  • No: Ignores the suspended special field in the uploaded file and leaves the existing user account status unchanged
  • Yes: Allows the existing user account to be suspended when the value of the suspended field is 1

The default setting is to allow suspending/activating of existing user accounts. 

Keep in mind that suspending an existing user account will prevent that user from logging in.

Prevent email address duplicates

It is possible, but not recommended, to upload users with duplicate email addresses.

To allow duplicate email addresses, go to Quick-access menu > Plugins > Authentication > Manage authentication. You can enable Allow accounts with same email. Then on the upload users screen you will be allowed to change the Prevent email address duplicates setting. However, doing this is not recommended. 

  • Yes: Prevents user accounts from being created if an existing user account already has the same email address as found in the uploaded file's email column
  • No: Allows user accounts to be created even if an existing user account already has the same email address found in the uploaded file's email column

By default, uploading users with duplicate email addresses is prevented.  

As users can log in with their email address, duplicate email addresses should be avoided. 

Standardise usernames

Standardise usernames is used by default to convert the username to lowercase, and to strip out illegal characters. It is possible to not standardise the usernames. However, standardising usernames is highly recommended.

  • Yes: Standardises usernames found in the uploaded file before updating existing or creating new user accounts so that the username contains only lowercase letters and numbers
  • No: Skips standardising usernames found in the uploaded file so that the newly created or updated usernames will be exactly as they are in the uploaded file (not recommended)

-

© Copyright 2024 Totara Learning Solutions. All rights reserved. Some content originally obtained via GPLv3 license and continues to be available under GPLv3. All other content is the sole copyright of Totara Learning Solutions. 

 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.