You are here

function ldapsync_stats in LDAP integration 6

Statistics counter function to track summary info.

Parameters

string $type The statistics category, e.g. new_users, notices, etc.:

int $n number of users to add to category, defaults to 0.:

Return value

int current count of users in category;

3 calls to ldapsync_stats()
_ldapsync_process_entry in ./ldapsync.module
Take an ldap object entry and determine if there is an existing account or a new account needs to be created.
_ldapsync_search in ./ldapsync.module
Find all LDAP users from servers and OUs specified in ldapauth settings and create or update existing users as needed.
_ldapsync_sync in ./ldapsync.module
Main routine.

File

./ldapsync.module, line 417
ldapsync keeps LDAP and Drupal user lists synchronized.

Code

function ldapsync_stats($type, $n = 0) {
  static $stats = array();
  if (!isset($stats[$type])) {
    $stats[$type] = 0;
  }
  $stats[$type] += $n;
  return $stats[$type];
}