Hide password field when password change is not supported by auth-module.

This commit is contained in:
paca70
2003-04-25 06:01:59 +00:00
parent 580f2fbc07
commit 87b490dfc6
+14 -12
View File
@@ -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>