Changeset 4019 in subversion for trunk/plugins/password/drivers/ldap.php


Ignore:
Timestamp:
Sep 30, 2010 3:02:52 AM (3 years ago)
Author:
alec
Message:
  • Added password_ldap_lchattr option (#1486927)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/password/drivers/ldap.php

    r3775 r4019  
    8181        return PASSWORD_CONNECT_ERROR; 
    8282    } 
     83 
     84    // Updating PasswordLastChange Attribute if desired 
     85    if ($lchattr = $rcmail->config->get('password_ldap_lchattr')) { 
     86       $current_day = (int)(time() / 86400); 
     87       if (!$userEntry->replace(array($lchattr => $current_day), $force)) { 
     88           return PASSWORD_CONNECT_ERROR; 
     89       } 
     90    } 
     91 
    8392    if (Net_LDAP2::isError($userEntry->update())) { 
    8493        return PASSWORD_CONNECT_ERROR; 
     
    8695     
    8796    // All done, no error 
    88     return PASSWORD_SUCCESS;     
     97    return PASSWORD_SUCCESS; 
    8998} 
    9099 
     
    270279    return $str; 
    271280} 
    272  
    273 ?> 
Note: See TracChangeset for help on using the changeset viewer.