- 06 Aug 2024
- 6 minutes to read
User preview settings
- Updated on 06 Aug 2024
- 6 minutes to read
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);
Setting | Description | Notes |
---|---|---|
Upload type | The Upload type specifies how to handle existing accounts.
| 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.
| 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.
| 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.
| The default setting is to allow suspending/activating of existing user accounts. |
Prevent email address duplicates | It is possible, but not recommended, to upload users with duplicate email addresses.
| 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.
| - |