Problem with MNet usernames greater than 30 characters, when $CFG->usersuniquebyusername is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Mahara |
Medium
|
Unassigned | ||
| 1.10 |
Medium
|
Unassigned | ||
| 15.04 |
Medium
|
Unassigned | ||
| 15.10 |
Medium
|
Unassigned |
Bug Description
This bug occurs when the following set of circumstances are in use:
1. MNet is set up, with users coming *into* Mahara
2. Mnet is set to auto-create user accounts in Mahara
3. $cfg->usersuniq
In this case, users coming from Mnet are provisioned in Mahara with a unique username based on their Moodle username, but truncated to 30 characters. Then on subsequent login attempts, their truncated Mahara username doesn't match their Moodle username, and they do not log in correctly.
Aaron Wells (u-aaronw) wrote : | #2 |
This is the second bug we've had in the past year that was caused by get_new_username() truncating usernames to 30 characters. (The earlier one was Bug 1486699, which added the param to change the default new username length, and set it to 40 for SAML.)
I wonder if it would make more sense to just update get_new_username() so that it instead truncates usernames to 255 characters, that being the length of usr.username and auth_remote_
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: master
commit b5df2226b478519
Author: Robert Lyon <email address hidden>
Date: Thu Mar 3 16:02:14 2016 +1300
Fix bug in xmlrpc + $cfg->usersuniq
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: Icdeb78b5298e7d
Patch for "15.10_STABLE" branch: https:/
Mahara Bot (dev-mahara) wrote : | #5 |
Patch for "15.04_STABLE" branch: https:/
Mahara Bot (dev-mahara) wrote : | #6 |
Patch for "1.10_STABLE" branch: https:/
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE
commit d22c3042cbd50cd
Author: Robert Lyon <email address hidden>
Date: Thu Mar 3 16:02:14 2016 +1300
Fix bug in xmlrpc + $cfg->usersuniq
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: Icdeb78b5298e7d
Mahara Bot (dev-mahara) wrote : | #8 |
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE
commit 2c15de2f78d0086
Author: Robert Lyon <email address hidden>
Date: Thu Mar 3 16:02:14 2016 +1300
Fix bug in xmlrpc + $cfg->usersuniq
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: Icdeb78b5298e7d
Mahara Bot (dev-mahara) wrote : | #9 |
Reviewed: https:/
Committed: https:/
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.10_STABLE
commit b0cf1d0fff1a1c2
Author: Robert Lyon <email address hidden>
Date: Thu Mar 3 16:02:14 2016 +1300
Fix bug in xmlrpc + $cfg->usersuniq
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: Icdeb78b5298e7d
no longer affects: | mahara/16.04 |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/6132