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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.5.9, 2.6.8, 2.7.5, 2.8.3
    • None
    • Authentication, Language
    • 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

              Unassigned Unassigned
              mits Mitsuhiro Yoshida
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: