-
Bug
-
Resolution: Fixed
-
Major
-
2.3.2
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
w42_
MDL-35854_m24_usergenerator -
calling self::getDataGenerator()->create_user() can generate username as 翔佐藤
This is not a standard username. It will fail validation against PARAM_USERNAME.
The bug error is due to the concatenation of firstname /lastname:
$record['username'] = textlib::strtolower($record['firstname']).textlib::strtolower($record['lastname']);
|
A quick fix is to clean_param and to incremente to $username.'XX'. It should be fine as these fake users should be cleaned at the end of the PHPunit tests.