You are here

function ldapauth_userinfo_delete_by_sid in LDAP integration 6

Clear all entries from {ldapauth_users} who match the given server id.

Parameters

Mixed $sid A server object or sid:

2 calls to ldapauth_userinfo_delete_by_sid()
ldapauth_admin_form_submit in ./ldapauth.admin.inc
Submit hook for the LDAP server form.
ldapauth_server_delete in includes/ldap.core.inc
Delete server settings

File

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

Code

function ldapauth_userinfo_delete_by_sid($server) {
  if (isset($server->sid)) {
    $sid = $server->sid;
  }
  else {
    $sid = $server;
  }
  if (is_numeric($sid)) {
    db_query("DELETE FROM {ldapauth_users} WHERE sid = %d", $sid);
  }
}