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

User creation: Login URL in the "New account" email doesn't always match the user language

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Important: This tests require your Moodle site will be configured for sending emails.

      Setup

      1. Login as admin
      2. Go to "Site administration | Language | Language packs" and install a couple of  language packages (such as Spanish and Catalan)
      3. Access to "Site administration | Language | Language settings" and set the "Default language" to the one downloaded (for instance, "Spanish")

       

      Testing scenario 1 (Add new user manually with Preferred language)

      1. Access as admin to "Site administration | Users | Accounts | Browse list of users" and click over the "Add a new user" button
        • CHECK that the Preferred language appears below the "Timezone"
      2. Fill in the form. Check the "Generate password and notify user" and set the "Preferred language" to "Catalan".
      3. Click over the "Create user" button
        • CHECK that a Catalan email has been sent with the site URL link ending with the user preferred language "/?lang=ca" (it may change if you've chosen a different "Preferred language" on the previous step)

      Testing scenario 2 (Add new user manually without Preferred language)

      1. Access as admin to "Site administration | Users | Accounts | Browse list of users" and click over the "Add a new user" button
      2. Fill in the form. Check the "Generate password and notify user" and leave the default value for the "Preferred language"
      3. Click over the "Create user" button
        • CHECK that a Spanish email has been sent with the site URL link ending with the default site language "/?lang=es" ((it may change if you've chosen a different language as "Default language" during setup)

      Testing scenario 3 (Upload users without password)

      1. Access as admin to "Site administration | Users | Accounts | Upload users"
      2. Upload a CSV file with the following fields: 
        • username,firstname,lastname,email
          jonest,Tom,Jones,jonest@uploadexample.com

      1. Make sure the field "New user password" is set to "Create password if needed and send via email"
      2. Click over the "Upload users" button
        • CHECK that the users defined in the CSV file have been created
        • CHECK that an email has been sent with the site URL link ending with the same language as the admin preferred language (it may change depending on the preferred language of the user who is uploading the CSV file)

      Testing scenario 4 (Upload users without password but set Preferred language)

      1. Access as admin to "Site administration | Users | Accounts | Upload users"
      2. Upload a CSV file with the following fields: 
        • username,firstname,lastname,email
          jonest,Tom,Jones,jonest@uploadexample.com

      1. Make sure the field "New user password" is set to "Create password if needed and send via email"
      2. Expand "Default values", click over "Show more..." and set the "Preferred language" to the other language (for instance, "Catalan")
      3. Click over the "Upload users" button
        • CHECK that the users defined in the CSV file have been created
        • CHECK that a Catalan email has been sent with the site URL link ending with "/?lang=ca" (it may change if you've chosen a different language in the previous step). 

      Testing scenario 5 (Upload users with passwords)

      1. Access as admin to "Site administration | Users | Accounts | Upload users"
      2. Upload a CSV file with the following fields: 
        • username,password,firstname,lastname,email
          jonest,verySecret3$,Tom,Jones,jonest@example.com

      1. Expand "Default values", click over "Show more..." and set the "Preferred language" to the other language (for instance, "Catalan")
      2. Click over the "Upload users" button
        • CHECK that the users defined in the CSV file have been created
        • CHECK that the preferred language for the users is the one selected on the previous step (Catalan, for instance). In that case, as the password is uploaded, no email is sent
      Show
      Important : This tests require your Moodle site will be configured for sending emails. Setup Login as admin Go to "Site administration | Language | Language packs" and install a couple of  language packages (such as Spanish and Catalan) Access to "Site administration | Language | Language settings" and set the "Default language" to the one downloaded (for instance, "Spanish")   Testing scenario 1 (Add new user manually with Preferred language) Access as admin to "Site administration | Users | Accounts | Browse list of users" and click over the "Add a new user" button CHECK that the Preferred language appears below the "Timezone" Fill in the form. Check the "Generate password and notify user" and set the "Preferred language" to "Catalan". Click over the "Create user" button CHECK that a Catalan email has been sent with the site URL link ending with the user preferred language "/?lang=ca" (it may change if you've chosen a different "Preferred language" on the previous step) Testing scenario 2 (Add new user manually without Preferred language) Access as admin to "Site administration | Users | Accounts | Browse list of users" and click over the "Add a new user" button Fill in the form. Check the "Generate password and notify user" and leave the default value for the "Preferred language" Click over the "Create user" button CHECK that a Spanish email has been sent with the site URL link ending with the default site language "/?lang=es" ((it may change if you've chosen a different language as "Default language" during setup) Testing scenario 3 (Upload users without password) Access as admin to "Site administration | Users | Accounts | Upload users" Upload a CSV file with the following fields:  username,firstname,lastname,email jonest,Tom,Jones,jonest @uploadexample .com Make sure the field "New user password" is set to "Create password if needed and send via email" Click over the "Upload users" button CHECK that the users defined in the CSV file have been created CHECK that an email has been sent with the site URL link ending with the same language as the admin preferred language (it may change depending on the preferred language of the user who is uploading the CSV file) Testing scenario 4 (Upload users without password but set Preferred language) Access as admin to "Site administration | Users | Accounts | Upload users" Upload a CSV file with the following fields:  username,firstname,lastname,email jonest,Tom,Jones,jonest @uploadexample .com Make sure the field "New user password" is set to "Create password if needed and send via email" Expand "Default values", click over "Show more..." and set the "Preferred language" to the other language (for instance, "Catalan") Click over the "Upload users" button CHECK that the users defined in the CSV file have been created CHECK that a Catalan email has been sent with the site URL link ending with "/?lang=ca" (it may change if you've chosen a different language in the previous step).  Testing scenario 5 (Upload users with passwords) Access as admin to "Site administration | Users | Accounts | Upload users" Upload a CSV file with the following fields:  username,password,firstname,lastname,email jonest,verySecret3$,Tom,Jones,jonest @example .com Expand "Default values", click over "Show more..." and set the "Preferred language" to the other language (for instance, "Catalan") Click over the "Upload users" button CHECK that the users defined in the CSV file have been created CHECK that the preferred language for the users is the one selected on the previous step (Catalan, for instance). In that case, as the password is uploaded, no email is sent
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-41847-master

      Description

      To be consistent, Login URL in the "New account" email received by the user when is account is created should be set to match the language of this user.
      Problem occurs when you have more than one language in your site en that a user account is created with the language that is not the site default.

      Here's an example of what it could be :

      Hi ...,

      A new account has been created for you at '...'
      and you have been issued with a new temporary password.

      Your current login information is now:
      username: ...
      password: ...
      (you will have to change your password
      when you login for the first time)

      To start using '...', login at
      yourmoodlesite/login/index.php?lang=en

      In most mail programs, this should appear as a blue link
      which you can just click on. If that doesn't work,
      then cut and paste the address into the address
      line at the top of your web browser window.

      Cheers from the '...' administrator,

      ...
      ...

        Attachments

        1. 1.PNG
          1.PNG
          204 kB
        2. 2.PNG
          2.PNG
          87 kB
        3. image-2018-08-01-15-44-24-004.png
          image-2018-08-01-15-44-24-004.png
          155 kB

          Issue Links

            Activity

              People

              • Votes:
                7 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m