summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53ca486)
raw | patch | inline | side by side (parent: 53ca486)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Jul 2010 05:40:47 +0000 (05:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Jul 2010 05:40:47 +0000 (05:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18934 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 83ecd4b6ef7976758a78e05eaaf1f9ba22aedf31..5052f921d3eef044bd072221a27141b6ad81e37d 100644 (file)
$attrs= $ldap->fetch();
$current= floor(date("U") /60 /60 /24);
+
// Fetch required attributes
foreach(array('shadowExpire','shadowLastChange','shadowMax','shadowMin',
'shadowInactive','shadowWarning') as $attr){
// the account expiration by the amount of days specified in (shadowInactive).
if($shadowExpire != null && $shadowExpire >= $current){
- // The account seems to be inactive, but we've to check 'shadowInactive' additionally.
+ // The account seems to be expired, but we've to check 'shadowInactive' additionally.
// ShadowInactive specifies an amount of days we've to reprieve the user.
// It some kind of x days' grace.
- if($shadowExpire == null || $shadowExpire + $shadowExpire >= $current){
+ if($shadowInactive == null || $current > $shadowExpire + $shadowInactive){
// Finally we've detect that the account is deactivated.
return(POSIX_ACCOUNT_EXPIRED);