public function LdapAuthorizationConsumerAbstract::createSingleAuthorization in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::createSingleAuthorization()
- 7 ldap_authorization/LdapAuthorizationConsumerAbstract.class.php \LdapAuthorizationConsumerAbstract::createSingleAuthorization()
Parameters
drupal user object $user: to have $consumer_id granted.
string lower case $consumer_id: $consumer_id such as drupal role name, og group name, etc.
mixed $consumer: depends on type of consumer. Drupal roles are strings, og groups are ??
return boolen TRUE on success, FALSE on fail. If user save is FALSE, the user object will not be saved and reloaded, so a returned TRUE may be misleading.
File
- ldap_authorization/
LdapAuthorizationConsumerAbstract.class.php, line 500 - 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 createSingleAuthorization(&$user, $consumer_id, $consumer, &$user_auth_data) {
// Method must be overridden.
}