function simple_ldap_sso_requirements in Simple LDAP 7
Same name and namespace in other branches
- 7.2 simple_ldap_sso/simple_ldap_sso.install \simple_ldap_sso_requirements()
Implements hook_requirements().
File
- simple_ldap_sso/
simple_ldap_sso.install, line 39 - Simple LDAP SSO install/update hooks.
Code
function simple_ldap_sso_requirements($phase) {
// Only check at runtime.
if ($phase != 'runtime') {
return;
}
// Get the t() function.
$t = get_t();
$errors = simple_ldap_configuration_errors();
$items['simple_ldap_sso_configured'] = array(
'title' => $t('Simple LDAP SSO'),
'value' => $errors ? $t('Not Configured') : $t('Configured'),
'description' => '',
'severity' => $errors ? REQUIREMENT_ERROR : REQUIREMENT_OK,
);
if ($errors) {
$t_args = array(
'!url' => url('admin/config/people/simple_ldap/sso'),
);
$items['simple_ldap_sso_configured']['description'] = theme('item_list', array(
'items' => $errors,
));
$items['simple_ldap_sso_configured']['description'] .= $t('Please visit the module’s <a href="!url">configuration form</a> to configure Simple LDAP SSO.', $t_args);
}
return $items;
}