Code

Updated expiration handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Dec 2010 14:18:27 +0000 (14:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Dec 2010 14:18:27 +0000 (14:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20557 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index c6e9f25b0b2f1270eb54678a91aa805b0caa0f8f..b68c9e55043df871de1b9a7817df971f83d9ae5b 100644 (file)
@@ -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).