diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-02-17 13:39:38 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-02-17 13:39:38 +0100 |
commit | 69995a164f9dbb51adfe17f09901e0200ea8dc7a (patch) | |
tree | 95a0dbb78112e515357cdcc9fed9e4e0ef2dc67f /inc | |
parent | b2117c6969fc31aa958f6019fd1e4e258f555db7 (diff) | |
download | rpg-69995a164f9dbb51adfe17f09901e0200ea8dc7a.tar.gz rpg-69995a164f9dbb51adfe17f09901e0200ea8dc7a.tar.bz2 |
do not hardcode profile link in AD pass expire message
Changing passwords might not be available.
Diffstat (limited to 'inc')
-rw-r--r-- | inc/auth/ad.class.php | 8 | ||||
-rw-r--r-- | inc/lang/de/lang.php | 2 | ||||
-rw-r--r-- | inc/lang/en/lang.php | 2 |
3 files changed, 9 insertions, 3 deletions
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 .= ' <a href="'.$url.'">'.$lang['btn_profile'].'</a>'; + } + msg($msg); } } diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 8fdffd66e..c7b2d7893 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -268,7 +268,7 @@ $lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede verà $lang['subscr_style_list'] = 'Liste der geänderten Seiten (Alle %.2f Tage)'; $lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wenden Sie sich an den Systembetreuer.'; $lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wenden Sie sich an den Systembetreuer.'; -$lang['authpwdexpire'] = 'Ihr Passwort läuft in %d Tag(en) ab. Sie sollten es <a href="?do=profile">ändern</a>.'; +$lang['authpwdexpire'] = 'Ihr Passwort läuft in %d Tag(en) ab, Sie sollten es bald ändern.'; $lang['i_chooselang'] = 'Wählen Sie Ihre Sprache'; $lang['i_installer'] = 'DokuWiki Installation'; $lang['i_wikiname'] = 'Wiki-Name'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 9250d119a..5c8628da5 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -275,7 +275,7 @@ $lang['subscr_style_list'] = 'list of changed pages since last email (e /* auth.class language support */ $lang['authmodfailed'] = 'Bad user authentication configuration. Please inform your Wiki Admin.'; $lang['authtempfail'] = 'User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.'; -$lang['authpwdexpire'] = 'Your password will expire in %d days. You should <a href="?do=profile">change it</a>.'; +$lang['authpwdexpire'] = 'Your password will expire in %d days, you should change it soon.'; /* installer strings */ $lang['i_chooselang'] = 'Choose your language'; |