Commit d22c3042 authored by Robert Lyon's avatar Robert Lyon
Browse files

Fix bug in xmlrpc + $cfg->usersuniquebyusername

Bug 1556692: When used together, these can cause problems when
the ID field from Moodle gets truncated to the default
get_new_username() length of "30", when being inserted into
usr.username in Mahara.

behatnotneeded: Can't test Mnet in Behat

Change-Id: Icdeb78b5298e7d63a0610987b0d8fad34e58d036
parent 1735487b
......@@ -199,7 +199,7 @@ class AuthXmlrpc extends Auth {
$user->authinstance = empty($this->config['parent']) ? $this->instanceid : $this->parent;
$user->username = get_new_username($remoteuser->username);
$user->username = get_new_username($remoteuser->username, 200);
$user->id = create_user($user, array(), $this->institution, $this, $remoteuser->username);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment