proper initialisation of passwordchangeurl; merged from MOODLE_16_STABLE

This commit is contained in:
skodak
2006-05-21 07:51:27 +00:00
parent 54eca8f2a4
commit 17037270bc
+4 -2
View File
@@ -144,11 +144,13 @@
$passwordchangeurl=$CFG->wwwroot.'/login/change_password.php';
} elseif($CFG->changepassword) {
$passwordchangeurl=$CFG->changepassword;
}
} else {
$passwordchangeurl = '';
}
// check whether the user should be changing password
if (get_user_preferences('auth_forcepasswordchange', false) || $frm->password == 'changeme'){
if (isset($passwordchangeurl)) {
if ($passwordchangeurl != '') {
redirect($passwordchangeurl);
} else {
error("You cannot proceed without changing your password.