summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-02-17 13:42:39 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-02-17 13:42:39 +0100
commit1e5105f90f56d0f57111eff37a535480115920c5 (patch)
tree596cd449dd2cea0867c9b150853d2ad275ee0c60
parent69995a164f9dbb51adfe17f09901e0200ea8dc7a (diff)
downloadrpg-1e5105f90f56d0f57111eff37a535480115920c5.tar.gz
rpg-1e5105f90f56d0f57111eff37a535480115920c5.tar.bz2
make sure AD pass expiry message is never shown twice
-rw-r--r--inc/auth/ad.class.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php
index dc1fef17a..cc080dc93 100644
--- a/inc/auth/ad.class.php
+++ b/inc/auth/ad.class.php
@@ -46,6 +46,7 @@ class auth_ad extends auth_basic {
var $opts = null;
var $adldap = null;
var $users = null;
+ var $msgshown = false;
/**
* Constructor
@@ -205,14 +206,18 @@ class auth_ad extends auth_basic {
$timeleft = round($timeleft/(24*60*60));
$info['expiresin'] = $timeleft;
- // if this is the current user, warn him
- if( ($_SERVER['REMOTE_USER'] == $user) && ($timeleft <= $this->cnf['expirywarn'])){
+ // if this is the current user, warn him (once per request only)
+ if( ($_SERVER['REMOTE_USER'] == $user) &&
+ ($timeleft <= $this->cnf['expirywarn']) &&
+ !$this->msgshown
+ ){
$msg = sprintf($lang['authpwdexpire'],$timeleft);
if($this->canDo('modPass')){
$url = wl($ID,array('do'=>'profile'));
$msg .= ' <a href="'.$url.'">'.$lang['btn_profile'].'</a>';
}
msg($msg);
+ $this->msgshown = true;
}
}