Commit 70abbf53 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Search remote usernames using original case, create mahara usernames in lowercase (bug 3272)

parent deb21f05
......@@ -219,7 +219,7 @@ class User {
WHERE
(
(
LOWER(r.remoteusername) = ?
r.remoteusername = ?
AND r.authinstance = ?
)'
. $parentwhere
......
......@@ -968,7 +968,7 @@ function load_user_institutions($userid) {
*/
function get_new_username($desired) {
$maxlen = 30;
$desired = substr($desired, 0, $maxlen);
$desired = strtolower(substr($desired, 0, $maxlen));
$taken = get_column_sql('
SELECT username FROM {usr}
WHERE username ' . db_ilike() . " '" . substr($desired, 0, $maxlen - 6) . "%'");
......
Supports Markdown
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