function ldapgroups_requirements in LDAP integration 6
Implementation of hook_requirements(). Checks that ldap extension is installed during install phase only.
Parameters
string $phase:
File
- ./
ldapgroups.install, line 17 - ldapgroups module installation and upgrade code.
Code
function ldapgroups_requirements($phase) {
if ($phase == 'install') {
$ldap_extension_loaded = extension_loaded('ldap');
$t = get_t();
$requirements = array(
'ldapgroups' => array(
'title' => $t('PHP LDAP Extension'),
'description' => $ldap_extension_loaded ? $t('extension enabled') : $t('The PHP LDAP extension is missing or not enabled. This is required by the LDAP Integration suite.'),
'severity' => $ldap_extension_loaded ? REQUIREMENT_OK : REQUIREMENT_ERROR,
),
);
return $requirements;
}
}