$CFG->loginhttps changes, change password and admin user edit.

This commit is contained in:
julmis 2004-06-22 18:34:35 +00:00
parent f8f92c3c6f
commit ab1324e415

View File

@ -93,10 +93,15 @@
$currentuser = ($user->id == $USER->id); $currentuser = ($user->id == $USER->id);
} }
if (($currentuser and !isguest()) or isadmin()) { if (($currentuser and !isguest()) or isadmin()) {
echo "<p><form action=edit.php method=get>"; if(empty($CFG->loginhttps)) {
echo "<input type=hidden name=id value=\"$id\">"; $wwwroot = $CFG->wwwroot;
echo "<input type=hidden name=course value=\"$course->id\">"; } else {
echo "<input type=submit value=\"".get_string("editmyprofile")."\">"; $wwwroot = str_replace('http','https',$CFG->wwwroot);
}
echo "<p><form action=\"$wwwroot/user/edit.php\" method=\"get\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo "<input type=\"hidden\" name=\"course\" value=\"$course->id\" />";
echo "<input type=\"submit\" value=\"".get_string("editmyprofile")."\" />";
echo "</form></p>"; echo "</form></p>";
} }
echo "</td></tr></table>"; echo "</td></tr></table>";
@ -194,7 +199,11 @@
$internalpassword = false; $internalpassword = false;
if (is_internal_auth()) { if (is_internal_auth()) {
if(empty($CFG->loginhttps)) {
$internalpassword = "$CFG->wwwroot/login/change_password.php"; $internalpassword = "$CFG->wwwroot/login/change_password.php";
} else {
$internalpassword = str_replace('http','https',$CFG->wwwroot.'/login/change_password.php');
}
} }
// Print other functions // Print other functions