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:
martin 2002-08-08 15:51:23 +00:00
parent a3447e1053
commit 2b25f2a09b
9 changed files with 109 additions and 66 deletions

View file

@ -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");
}