From 871feb09eeafba68f9a87d1c98b6c3e0a92593e6 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 6 Jul 2010 14:01:20 +0000 Subject: [PATCH] Updated expiration detection git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18947 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 9 +++++++++ 1 file changed, 9 insertions(+) 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. // -------------------------------------------------------- -- 2.30.2