Commit 24bc4d44 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Merge commit 'mahara-security/master'

parents 0e8c9a17 8fded07f
......@@ -1216,7 +1216,8 @@ function get_new_username($desired) {
$desired = strtolower(substr($desired, 0, $maxlen));
$taken = get_column_sql('
SELECT username FROM {usr}
WHERE username ' . db_ilike() . " '" . substr($desired, 0, $maxlen - 6) . "%'");
WHERE username ' . db_ilike() . " ?",
array(substr($desired, 0, $maxlen - 6) . '%'));
if (!$taken) {
return $desired;
}
......
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