You are here

function _ldapauth_ldap_info in LDAP integration 6

Retrieve the saved ldapauth PhP code filters.

Parameters

$sid: A server ID or user object.

$req: The filter code needed, e.g. login_php or filter_php.

Return value

The attribute value.

2 calls to _ldapauth_ldap_info()
_ldapauth_auth in ./ldapauth.module
Authenticate the user against LDAP servers.
_ldapauth_user_lookup in ./ldapauth.module
Queries LDAP server for the user.

File

./ldapauth.module, line 714
ldapauth provides authentication against ldap server.

Code

function _ldapauth_ldap_info($sid, $req) {
  if (!($sid = is_object($sid) ? isset($sid->ldap_config) ? $sid->ldap_config : NULL : $sid)) {
    return;
  }
  $server = ldapauth_server_load($sid);
  switch ($req) {
    case 'login_php':
      return $server->login_php;
    case 'filter_php':
      return $server->filter_php;
  }
}