public function LdapAuthorizationConsumerAbstract::sortConsumerIds in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::sortConsumerIds()
- 7 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::sortConsumerIds()
some authorization schemes such as organic groups, require a certain order. implement this method to sort consumer ids/authorization ids
Parameters
string $op 'grant' or 'revoke' signifying what to do with the $consumer_ids:
$consumers associative array in form of LdapAuthorizationConsumerAbstract::populateConsumersFromConsumerIds:
alters $consumers by reference
1 call to LdapAuthorizationConsumerAbstract::sortConsumerIds()
1 method overrides LdapAuthorizationConsumerAbstract::sortConsumerIds()
- LdapAuthorizationConsumerOG::sortConsumerIds in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - in organic groups 7.x-1.x, consumer ids are in form gid-rid such as 3-2, 3-3. We want highest authorization available granted. But, granting member role (2), revokes other roles such as admin in OG. So for granting we want the order: 3-1, 3-2, 3-3…
File
- ldap_authorization/
LdapAuthorizationConsumerAbstract.class.php, line 256 - 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 sortConsumerIds($op, &$consumers) {
}