You are here

function ldap_authorization_og_authorization_id in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_authorization/ldap_authorization_og/ldap_authorization_og.module \ldap_authorization_og_authorization_id()
  2. 7.2 ldap_authorization/ldap_authorization_og/ldap_authorization_og.module \ldap_authorization_og_authorization_id()

Format authorization id

Parameters

int $gid as organic group gid:

int $rid as organic group rig:

array $group_entity as entity associated with organic group:

Return value

string "normalized" authorization id such as 3-3

8 calls to ldap_authorization_og_authorization_id()
LdapAuthorizationConsumerOG::mappingExamples in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
* Get list of mappings based on existing Organic Groups and roles * *
LdapAuthorizationConsumerOG::normalizeMappings in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
function to normalize mappings should be overridden when mappings are not stored as map|authorization_id format where authorization_id is the format returned by LdapAuthorizationConsumerAbstract::usersAuthorizations()
LdapAuthorizationConsumerOG::og2Groups in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
LdapAuthorizationConsumerOG::usersAuthorizations in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
* Return all user authorization ids (group x role) in form gid-rid such as 2-1. * regardless of it they were granted by this module, any authorization ids should be returned. * *
LdapAuthorizationConsumerOG::_setConsumerIDs in ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php

... See full list

File

ldap_authorization/ldap_authorization_og/ldap_authorization_og.module, line 49
controls organic group membership based on LDAP values

Code

function ldap_authorization_og_authorization_id($gid, $rid, $entity_type = NULL) {
  return ldap_authorization_og_og_version() == 1 ? $gid . '-' . $rid : join(':', array(
    $entity_type,
    $gid,
    $rid,
  ));
}