function ldap_authorization_og_ldap_authorization_consumer in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authorization/ldap_authorization_og/ldap_authorization_og.module \ldap_authorization_og_ldap_authorization_consumer()
- 7 ldap_authorization/ldap_authorization_og/ldap_authorization_og.module \ldap_authorization_og_ldap_authorization_consumer()
Implements hook_ldap_authorization_consumer().
1 call to ldap_authorization_og_ldap_authorization_consumer()
- LdapAuthorizationConsumerOG::__construct in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - Constructor Method
File
- ldap_authorization/
ldap_authorization_og/ ldap_authorization_og.module, line 13 - controls organic group membership based on LDAP values
Code
function ldap_authorization_og_ldap_authorization_consumer() {
$types['og_group'] = array(
'consumer_name' => t('OG group'),
'consumer_name_plural' => t('OG groups'),
'consumer_short_name' => t('group'),
'consumer_short_name_plural' => t('groups'),
'consumer_description' => t('An OG group.'),
'consumer_class_name' => 'LdapAuthorizationConsumerOG',
'consumer_class_file' => 'LdapAuthorizationConsumerOG.class.php',
'consumer_module' => 'ldap_authorization_og',
);
if (ldap_authorization_og_og_version() == 1) {
$types['og_group']['consumer_mapping_directions'] = 'Mappings should be of form:<br/>
<code>[raw authorization id]|[og group match field]=[og group match id],[og role match field]=[og role match id]</code>
<br/>such as:<br/>
<code>
Student Accounts|group-name=students,role-name=member<br/>
cn=honors students,ou=groups,dc=hogwarts,dc=edu|gid=7,rid=28<br/>
</code>';
}
else {
$types['og_group']['consumer_mapping_directions'] = 'Mappings should be of form:<br/>
<code>[raw authorization id]|[og entity type]:[og entity id or title]:[og role id]</code>
<br/>[og entity type] is generally "node"
<br/>[og entity id or title] can be the groups title or entity id. <strong>Titles with ":"s in them may not be used</strong>.
<br/>when [og role id] is left off, default role is used.
<br/>such as:<br/>
<code>
Student Accounts|node:17:2<br/>
cn=honors students,ou=groups,dc=hogwarts,dc=edu|node:honors students<br/>
cn=gryffindor,ou=groups,dc=hogwarts,dc=edu|node:gryffindor:3<br/>
</code>';
}
return $types;
}