From: hickert Date: Tue, 6 Jul 2010 14:01:20 +0000 (+0000) Subject: Updated expiration detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=871feb09eeafba68f9a87d1c98b6c3e0a92593e6;p=gosa.git Updated expiration detection git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18947 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 805acec79..531f7942b 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -732,6 +732,15 @@ function ldap_expired_account($config, $userdn, $uid) } } + // -- I guess this is the correct detection, isn't it? + if($shadowLastChange != null && $shadowWarning != null && $shadowMax != null){ + $daysRemaining = ($shadowLastChange + $shadowMax) - $current ; + if($daysRemaining > 0 && $daysRemaining <= $shadowWarning){ + return(POSIX_WARN_ABOUT_EXPIRATION); + } + } + + // Check if we've to force the user to change his password. // --------------------------------------------------------