From 69995a164f9dbb51adfe17f09901e0200ea8dc7a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 17 Feb 2012 13:39:38 +0100 Subject: do not hardcode profile link in AD pass expire message Changing passwords might not be available. --- inc/auth/ad.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'inc/auth') diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index cb59c5a48..dc1fef17a 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -149,6 +149,7 @@ class auth_ad extends auth_basic { function getUserData($user){ global $conf; global $lang; + global $ID; if(!$this->_init()) return false; if($user == '') return array(); @@ -206,7 +207,12 @@ class auth_ad extends auth_basic { // if this is the current user, warn him if( ($_SERVER['REMOTE_USER'] == $user) && ($timeleft <= $this->cnf['expirywarn'])){ - msg(sprintf($lang['authpwdexpire'],$timeleft)); + $msg = sprintf($lang['authpwdexpire'],$timeleft); + if($this->canDo('modPass')){ + $url = wl($ID,array('do'=>'profile')); + $msg .= ' '.$lang['btn_profile'].''; + } + msg($msg); } } -- cgit v1.2.3