Hide password field when password change is not supported by auth-module.
This commit is contained in:
+14
-12
@@ -21,19 +21,21 @@ if (isadmin()) {
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr valign=top>";
|
||||
echo "<td><P>".get_string("newpassword").":</td>";
|
||||
echo "<td><input type=text name=newpassword size=20 value=\"";
|
||||
if (isset($user->newpassword)) p($user->newpassword);
|
||||
echo "\">";
|
||||
if (isset($err["newpassword"])) {
|
||||
formerr($err["newpassword"]);
|
||||
} else if (empty($user->newpassword)) {
|
||||
echo " (".get_string("leavetokeep").")";
|
||||
if($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"){
|
||||
echo "<tr valign=top>";
|
||||
echo "<td><P>".get_string("newpassword").":</td>";
|
||||
echo "<td><input type=text name=newpassword size=20 value=\"";
|
||||
if (isset($user->newpassword)) p($user->newpassword);
|
||||
echo "\">";
|
||||
if (isset($err["newpassword"])) {
|
||||
formerr($err["newpassword"]);
|
||||
} else if (empty($user->newpassword)) {
|
||||
echo " (".get_string("leavetokeep").")";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr><td colspan=2><HR></td></tr>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr><td colspan=2><HR></td></tr>";
|
||||
}
|
||||
?>
|
||||
<tr valign=top>
|
||||
|
||||
Reference in New Issue
Block a user