Upload users via CSV

2. Uploading Users

2.5. Optional user fields

You are able to to provide one or more of these optional user fields in your CSV file below.

Institution, department, city, country, lang, auth, timezone, idnumber, icq, phone1, phone2, address, url, description, mailformat, maildisplay, maildigest, htmleditor, autosubscribe, interests

Most of these above are user profile fields or user preference fields that belong to the user profile and are the filled in either by the user or upon creation. Some of these fields require specific formats.

Please note that commas within a field must be encoded as &#44 - the script will decode these back to commas. For Boolean fields (true or false) with only two values, use 0 for false and 1 for true.

Key optional field formats include:

  • country - You must use the country TWO LETTER CODE, in upper case, eg AU,ES,GB,US. These are all UPPER CASE.
  • lang - You must use the two letter (or extended four letter) code as defined in the Moodle language packs, e.g. en, es, en_us, de, in Site administration > Language > Language packs.
  • auth - The auth field must be used if the site uses an alternative authentication method, such as LDAP, as otherwise the authentication method will default to manual and users using a different authentication method won't be able to login. Use the shortname codes defined in Plugins > Authentication for the various types, e.g. manual, nlogin, ldap, cas, mnet, db, none. If you do not include an auth column, then newly created users will be created with the manual account type.
  • timezone - Should be in the format as found in the Location settings in terms of Zone/Region, eg. Australia/Sydney, Asia/Kathmandu, Europe/Madrid, etc. The entry is case sensitive so Europe/London will work but europe/london will not.