MDL-9860 Incorrect check for password expiration at login - patch by Iñaki Arenaza

This commit is contained in:
skodak
2007-05-21 19:58:50 +00:00
parent a6989f9cbd
commit 8dd34ce9bc
+1 -1
View File
@@ -227,7 +227,7 @@ httpsrequired();
// Currently supported only for ldap-authentication module
if (!empty($userauth->config->expiration) and $userauth->config->expiration == 1) {
$days2expire = $userauth->password_expire($USER->username);
if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) {
if (intval($days2expire) > 0 && intval($days2expire) < intval($userauth->config->expiration_warning)) {
print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite, $focus, "", true, "<div class=\"langmenu\">$langmenu</div>");
notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo);
print_footer();