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

Create account and non-ASCII symbols (solution included)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: Authentication
    • Labels:
      None
    • Environment:
      Moodle 1.6.2+ from 15.09
      httpd-2.2.2
      php-4.4.2
      mysql-4.1.20
    • Affected Branches:
      MOODLE_16_STABLE

      Description

      When peoples create account witn non-ASCII symbols (for example russian symbols) username, confirmation e-mail contain bad link (link only for ASCII symbols and plain text username).
      For example, username: ?????
      Link: http://www.cdp.tsure.ru/moodle/login/confirm.php?data=KnIypNG1kDuK9nJ/?????
      Only http://www.cdp.tsure.ru/moodle/login/confirm.php?data=KnIypNG1kDuK9nJ/ - link and "?????" - plain text. Peoples can't confirm account and it confused theirs...

      Solution:
      in moodlelib.php in function send_confirmation_email use urlencode for $user->username
      $data->link = $CFG->wwwroot .'/login/confirm.php?data='. $user->secret .'/'. urlencode($user->username);
      instead of
      $data->link = $CFG->wwwroot .'/login/confirm.php?data='. $user->secret .'/'. $user->username;

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              aav Artem Andreev
              Tester:
              Nobody Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: