Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e8b578c8
Commit
e8b578c8
authored
Nov 10, 2017
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 10, 2017
Browse files
Merge "Bug 1720237: adding default username to use in registration"
parents
491bb57f
1af48e44
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/user.php
View file @
e8b578c8
...
...
@@ -1804,6 +1804,9 @@ function load_user_institutions($userid) {
* @param string $maxlen Maximum length of desired username
*/
function
get_new_username
(
$desired
,
$maxlen
=
30
)
{
if
(
empty
(
$desired
))
{
$desired
=
'user'
;
}
if
(
function_exists
(
'mb_strtolower'
))
{
$desired
=
mb_strtolower
(
mb_substr
(
$desired
,
0
,
$maxlen
,
'UTF-8'
),
'UTF-8'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment