Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64770

User profile fields uniqueness don't work while user importing



    • Affected Branches:


      Defining new user profile field there are several options:

      • Is this field required? YES/NO
      • Is this field locked? YES/NO
      • Should the data be unique? YES/NO
      • Display on signup page? YES/NO
      • Who is this field visible to? NOT VISIBLE/VISIBLE TO USER/VISIBLE TO EVERYONE

      It seems that user profile fields uniqueness does not work when users are imported from a file (tested with current users data update, not creating new one). There are even no any warning about this.

      What do you think about this behavior? This is a bug or not in your opinion? 

      How to reproduce?

      1. Make sure that you have at least two users on your Moodle site.
      2. ADMIN: Add new user profile field: Site administration -> Users -> Accounts -> User profile fields; required options:
        • Should the data be unique? YES
      3. ADMIN: Site administration -> Users -> Accounts -> Bulk user actions
        • Selected user list... Add all
        • With selected users... Download -> Go -> Download
      4. Type the same value for at least two user for user profile field defined in 2.
      5. ADMIN: Select changed file with users on Site administration -> Users -> Accounts -> Upload users
        • Upload type: Update existing users only
        • Existing user details: Override with file
      6. User profile fields values for at least 2 users will be duplicated


          Issue Links



              • Assignee:
                lukasz Łukasz Szeremeta
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: