function ldap_authorization_tokens in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_authorization/ldap_authorization.module \ldap_authorization_tokens()
- 7.2 ldap_authorization/ldap_authorization.module \ldap_authorization_tokens()
just tokens for better watchdog and drupal_set_message arguments *
3 calls to ldap_authorization_tokens()
- LdapAuthorizationConsumerConfAdmin::drupalForm in ldap_authorization/
LdapAuthorizationConsumerConfAdmin.class.php - ldap_authorization_test_form in ldap_authorization/
ldap_authorization.admin.test.inc - form for adding, updating, and deleting a single ldap authorization consumer configuration
- ldap_authorization_test_form_submit in ldap_authorization/
ldap_authorization.admin.test.inc - submit handler function for ldap_authorization_test
File
- ldap_authorization/
ldap_authorization.module, line 276 - ldap authorization module
Code
function ldap_authorization_tokens($consumer) {
$tokens = array();
if (is_object($consumer)) {
foreach (array(
'%',
'!',
'@',
) as $symbol) {
foreach (array(
'name',
'namePlural',
'shortName',
'shortNamePlural',
'consumerModule',
'consumerType',
'mappingDirections',
'testLink',
'editLink',
) as $property) {
$tokens[$symbol . 'consumer_' . $property] = $consumer->{$property};
}
if (is_object($consumer->consumerConf)) {
foreach (array(
'sid',
'status',
) as $property) {
$tokens[$symbol . 'consumer_' . $property] = $consumer->consumerConf->{$property};
}
}
}
}
return $tokens;
}