You are here

public function LdapAuthorizationConsumerAbstract::authorizationRevoke in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::authorizationRevoke()
  2. 7.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::authorizationRevoke()

revoke authorizations to a user

Parameters

object $user drupal user object:

$consumer_ids string or array of strings that are authorization consumer ids:

array $ldap_entry is ldap data from ldap entry which drupal user is mapped to:

boolean $user_save. should user object be saved by authorizationGrant method:

Return value

array $results. Array of form array( <authz consumer id1> => 1, <authz consumer id2> => 0, ) where 1s and 0s represent success and failure to revoke $user_auth_data is returned by reference

method may be desireable to override, if consumer benefits from revoking grants as a group rather than one at a time

File

ldap_authorization/LdapAuthorizationConsumerAbstract.class.php, line 189
abstract class to represent an ldap_authorization consumer such as drupal_role, og_group, etc. each authorization comsumer will extend this class with its own class named LdapAuthorizationConsumer<consumer type> such as…

Class

LdapAuthorizationConsumerAbstract
@file abstract class to represent an ldap_authorization consumer such as drupal_role, og_group, etc. each authorization comsumer will extend this class with its own class named LdapAuthorizationConsumer<consumer type> such as…

Code

public function authorizationRevoke(&$user, &$user_auth_data, $consumer_ids, $ldap_entry, $user_save = TRUE) {
  $this
    ->grantsAndRevokes('revoke', $user, $user_auth_data, $consumer_ids, $ldap_entry, $user_save);
}