You are here

function ldapauth_userinfo_delete in LDAP integration 6

Delete a ldapauth_users record.

Parameters

Mixed $userinfo Either the luid or the full object to delete:

2 calls to ldapauth_userinfo_delete()
ldapauth_user in ./ldapauth.module
Implements hook_user().
ldapauth_user_to_local_user in ./ldapauth.admin.inc
Page callback function to convert a user from an LDAP authenticated user to a normal drupal user.

File

includes/ldap.core.inc, line 202
The core functions that ldapauth supplies for submodules. Will be included by default by ldapauth.

Code

function ldapauth_userinfo_delete($userinfo) {
  if (is_numeric($userinfo)) {
    $userinfo = ldapauth_userinfo_load($userinfo);
  }
  elseif (is_array($userinfo)) {
    $userinfo = (object) $userinfo;
  }
  if ($userinfo && isset($userinfo->luid)) {
    db_query("DELETE FROM {ldapauth_users} WHERE luid = %d", $userinfo->luid);
  }
}