You are here

function ldap_user_cron in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 8.4 ldap_user/ldap_user.module \ldap_user_cron()
  2. 8.3 ldap_user/ldap_user.module \ldap_user_cron()
  3. 7.2 ldap_user/ldap_user.module \ldap_user_cron()

Implements hook_cron().

File

ldap_user/ldap_user.module, line 130
Module for the LDAP User Entity

Code

function ldap_user_cron() {
  $ldap_user_conf = ldap_user_conf();
  if ($ldap_user_conf->orphanedDrupalAcctBehavior != 'ldap_user_orphan_do_not_check') {
    module_load_include('inc', 'ldap_user', 'ldap_user.cron');
    $result = _ldap_user_orphans($ldap_user_conf);
    if ($result !== TRUE) {
      watchdog('ldap_user', 'LDAP User check for orphaned ldap provisioned Drupal accounts failed', array(), WATCHDOG_ERROR);
    }
  }
}