With external authentication, the change password button on the user

page now does the same thing as the one on the login page.  It takes you
to the specified URL is it exists, and just doesn't appear if there is no URL
This commit is contained in:
moodler
2002-11-28 12:31:46 +00:00
parent 048ccc473a
commit 3086f3f6cf
2 changed files with 16 additions and 5 deletions
+15 -4
View File
@@ -121,13 +121,24 @@
echo "</TD></TR></TABLE></TABLE>";
$internalpassword = false;
if ($CFG->auth == "email" or $CFG->auth == "none") {
$internalpassword = "$CFG->wwwroot/login/change_password.php";
}
// Print other functions
echo "<CENTER><TABLE ALIGN=CENTER><TR>";
if ($user->id == $USER->id and !isguest()) {
echo "<TD NOWRAP><P><FORM ACTION=\"$CFG->wwwroot/login/change_password.php\" METHOD=GET>";
echo "<INPUT type=hidden name=id value=\"$course->id\">";
echo "<INPUT type=submit value=\"".get_string("changepassword")."\">";
echo "</FORM></P></TD>";
if ($CFG->auth == "email" or $CFG->auth == "none") {
echo "<TD NOWRAP><P><FORM ACTION=\"$CFG->wwwroot/login/change_password.php\" METHOD=GET>";
echo "<INPUT type=hidden name=id value=\"$course->id\">";
echo "<INPUT type=submit value=\"".get_string("changepassword")."\">";
echo "</FORM></P></TD>";
} else if ($CFG->changepassword) {
echo "<TD NOWRAP><P><FORM ACTION=\"$CFG->changepassword\" METHOD=GET>";
echo "<INPUT type=submit value=\"".get_string("changepassword")."\">";
echo "</FORM></P></TD>";
}
}
if ((isstudent($course->id) and ($user->id == $USER->id) and !isguest()) or
(isteacher($course->id) and isstudent($course->id, $user->id)) ) {