public function LdapAuthorizationConsumerAbstract::authorizationRevoke in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::authorizationRevoke()
- 7 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::authorizationRevoke()
revoke authorizations to a user
Parameters
object $user drupal user object:
array $consumers in form of LdapAuthorizationConsumerAbstractClass::populateConsumersFromConsumerIds:
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 220 - abstract class to represent an ldap_authorization consumer behavior 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
Code
public function authorizationRevoke(&$user, &$user_auth_data, $consumers, $ldap_entry, $user_save = TRUE) {
$this
->filterOffPastAuthorizationRecords($user, $user_auth_data);
$this
->grantsAndRevokes('revoke', $user, $user_auth_data, $consumers, $ldap_entry, $user_save);
}