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

function send_confirmation_email should use firstname and lastname parameters

XMLWordPrintable

      Hi,
      I found that the string['emailconfirmation'] uses a parameter firstname which contains the fullname of a user.

      In moodle/lib/moodlelib.php you will find the function send_confirmation_email($user) where Moodle allocates the wrong thing.

      $data->firstname = fullname($user);
      

      I found this problem in the language packs. The starts with the following words:

      Hi {$a->firstname},
      A new account has been requested at '{$a->sitename}' using your email address.
      

      You see the firstname parameter in the string but Moodle sends the full name.

      In other functions you will find the correct allocation, for example in the function send_password_change_confirmation_email($user).

      $data->firstname = $user->firstname;
      $data->lastname = $user->lastname;
      

      The string['emailpasswordchangeinfo'] only uses the first name in the english version

      Hi {$a->firstname},
      Someone (probably you) has requested a new password for your account on '{$a->sitename}'.
      

      but in the german language pack we are using both names.

      Guten Tag {$a->firstname} {$a->lastname},
      jemand (wahrscheinlich Sie) hat ein neues Kennwort für Ihren Zugang auf '{$a->sitename}' angefordert.
      

      Best regards, Ralf

            Votes:
            4 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.