mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
Further excellent tidy-ups to the admin pages. They are actually starting
to look/work as slick as the rest of the site. :-)
This commit is contained in:
parent
a3447e1053
commit
2b25f2a09b
9 changed files with 109 additions and 66 deletions
|
@ -180,9 +180,18 @@
|
|||
function find_form_errors(&$user, &$usernew, &$err) {
|
||||
|
||||
if (isadmin()) {
|
||||
if (empty($usernew->username))
|
||||
if (empty($usernew->username)) {
|
||||
$err["username"] = get_string("missingusername");
|
||||
|
||||
} else if (record_exists("user", "username", $usernew->username) and $user->username == "changeme") {
|
||||
$err["username"] = get_string("usernameexists");
|
||||
|
||||
} else {
|
||||
$string = eregi_replace("[^([:alnum:])]", "", $user->username);
|
||||
if (strcmp($user->username, $string))
|
||||
$err["username"] = get_string("alphanumerical");
|
||||
}
|
||||
|
||||
if (empty($usernew->newpassword) and empty($user->password))
|
||||
$err["newpassword"] = get_string("missingpassword");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue