diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/authad/auth.php | 32 | ||||
-rw-r--r-- | lib/plugins/authad/lang/ja/settings.php | 5 | ||||
-rw-r--r-- | lib/plugins/authldap/lang/ja/settings.php | 5 | ||||
-rw-r--r-- | lib/plugins/authmysql/lang/ja/settings.php | 5 | ||||
-rw-r--r-- | lib/plugins/authpgsql/lang/ja/settings.php | 5 |
5 files changed, 37 insertions, 15 deletions
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 5985cd18f..95a25c5af 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -218,22 +218,24 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { // check expiry time if($info['expires'] && $this->conf['expirywarn']){ - $timeleft = $adldap->user()->passwordExpiry($user); // returns unixtime - $timeleft = round($timeleft/(24*60*60)); - $info['expiresin'] = $timeleft; - - // if this is the current user, warn him (once per request only) - if(($_SERVER['REMOTE_USER'] == $user) && - ($timeleft <= $this->conf['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>'; + $expiry = $adldap->user()->passwordExpiry($user); + if(is_array($expiry)){ + $info['expiresat'] = $expiry['expiryts']; + $info['expiresin'] = round(($info['expiresat'] - time())/(24*60*60)); + + // if this is the current user, warn him (once per request only) + if(($_SERVER['REMOTE_USER'] == $user) && + ($info['expiresin'] <= $this->conf['expirywarn']) && + !$this->msgshown + ) { + $msg = sprintf($lang['authpwdexpire'], $info['expiresin']); + if($this->canDo('modPass')) { + $url = wl($ID, array('do'=> 'profile')); + $msg .= ' <a href="'.$url.'">'.$lang['btn_profile'].'</a>'; + } + msg($msg); + $this->msgshown = true; } - msg($msg); - $this->msgshown = true; } } diff --git a/lib/plugins/authad/lang/ja/settings.php b/lib/plugins/authad/lang/ja/settings.php new file mode 100644 index 000000000..576f0eeb5 --- /dev/null +++ b/lib/plugins/authad/lang/ja/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Japanese language file + * + */ diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php new file mode 100644 index 000000000..576f0eeb5 --- /dev/null +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Japanese language file + * + */ diff --git a/lib/plugins/authmysql/lang/ja/settings.php b/lib/plugins/authmysql/lang/ja/settings.php new file mode 100644 index 000000000..576f0eeb5 --- /dev/null +++ b/lib/plugins/authmysql/lang/ja/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Japanese language file + * + */ diff --git a/lib/plugins/authpgsql/lang/ja/settings.php b/lib/plugins/authpgsql/lang/ja/settings.php new file mode 100644 index 000000000..576f0eeb5 --- /dev/null +++ b/lib/plugins/authpgsql/lang/ja/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Japanese language file + * + */ |