$adminself = (($theadmin->id == $USER->id) and ($USER->id == $user->id));
echo "<tr valign=top>";
echo "<td><p>".get_string("username").":</td>";
- if ($adminself || $CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+ if ($adminself || is_internal_auth() ){
echo "<td><input type=\"text\" name=\"username\" size=20 value=\"";
p($user->username);
echo "\">";
echo "</td>";
echo "</tr>";
- if ($adminself || $CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
+ if ($adminself || is_internal_auth() ){
echo "<tr valign=top>";
echo "<td><p>".get_string("newpassword").":</td>";
echo "<td><input type=\"text\" name=\"newpassword\" size=20 value=\"";
$err["username"] = get_string("alphanumerical");
}
- if (empty($usernew->newpassword) and empty($user->password))
+ if (empty($usernew->newpassword) and empty($user->password) and is_internal_auth() )
$err["newpassword"] = get_string("missingpassword");
if (($usernew->newpassword == "admin") or ($user->password == md5("admin") and empty($usernew->newpassword)) ) {
echo "</TD></TR></TABLE></TABLE>";
$internalpassword = false;
- if ($CFG->auth == "email" or $CFG->auth == "none" or $CFG->auth == "manual") {
+ if (is_internal_auth()) {
$internalpassword = "$CFG->wwwroot/login/change_password.php";
}