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

Converting a Japanese Zenkaku(Full-width) login username to Hankaku(Half-width)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.5.9, 2.6.8, 2.7.5, 2.8.3
    • Fix Version/s: None
    • Component/s: Authentication, Language
    • Labels:
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE

      Description

      Students sometimes make login mistakes by typing their usename with Japanese Zenkaku(Full-width).
      We can avoid this mistake by adding one line to login/index.php as below.

      File:
      login/index.php

      Line:
      123

      [ before ]
      if ($frm and isset($frm->username)) { // Login WITH cookies

      $frm->username = trim(core_text::strtolower($frm->username));

      [ after ]
      if ($frm and isset($frm->username)) { // Login WITH cookies

      $frm->username = mb_convert_kana($frm->username, 'a', 'utf-8');
      $frm->username = trim(core_text::strtolower($frm->username));

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mits Mitsuhiro Yoshida
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: