From: hickert Date: Tue, 14 Dec 2010 14:50:44 +0000 (+0000) Subject: Updated account expiration check, added check for sambaKickoffTime X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2c1424a1ef8b318d28246ae11c6fd525aeac4558;p=gosa.git Updated account expiration check, added check for sambaKickoffTime git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@20559 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index c6e9f25b0..b68c9e550 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -701,11 +701,21 @@ function ldap_expired_account($config, $userdn, $uid) // Fetch required attributes foreach(array('shadowExpire','shadowLastChange','shadowMax','shadowMin', - 'shadowInactive','shadowWarning') as $attr){ + 'shadowInactive','shadowWarning','sambaKickoffTime') as $attr){ $$attr = (isset($attrs[$attr][0]))? $attrs[$attr][0] : null; } + // Check if the account has reached its kick off limitations. + // --------------------------------------------------------- + // Once the accout reaches the kick off limit it has expired. + if($sambaKickoffTime !== null){ + if(time() >= $sambaKickoffTime){ + return(POSIX_ACCOUNT_EXPIRED); + } + } + + // Check if the account has expired. // --------------------------------- // An account is locked/expired once its expiration date has reached (shadowExpire).