public function LdapAuthorizationConsumerOG::_setConsumerIDs in Lightweight Directory Access Protocol (LDAP) 7
2 calls to LdapAuthorizationConsumerOG::_setConsumerIDs()
- LdapAuthorizationConsumerOG::refreshConsumerIDs in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - LdapAuthorizationConsumerOG::__construct in ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php - Constructor Method
File
- ldap_authorization/
ldap_authorization_og/ LdapAuthorizationConsumerOG.class.php, line 53
Class
Code
public function _setConsumerIDs() {
$this->_availableConsumerIDs = array();
if ($this->ogVersion == 1) {
// og 7.1.x
$groups = og_get_all_group();
$og_entities = og_load_multiple($groups);
foreach ($og_entities as $group) {
$this->ogs[$group->gid] = $group;
foreach ($this->ogRoles as $rid => $role) {
$auth_id = ldap_authorization_og_authorization_id($group->gid, $rid);
$this->_availableConsumerIDs[$auth_id] = $group->label . ", {$role}";
}
}
}
else {
// og 7.2.x
list($this->ogs, $this->_availableConsumerIDs) = $this
->og2Groups();
// dpm($this->ogs); dpm($this->_availableConsumerIDs);
}
}