MDL-9860 Incorrect check for password expiration at login - patch by Iñaki Arenaza...
authorskodak <skodak>
Mon, 21 May 2007 20:00:10 +0000 (20:00 +0000)
committerskodak <skodak>
Mon, 21 May 2007 20:00:10 +0000 (20:00 +0000)
login/index.php

index 8c6484147257228031e44c55bccbff1bb6433daa..a4cb4f09e1faca68765aefc1cef7bf5ec6dfa996 100644 (file)
@@ -223,7 +223,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();