function ldapdata_requirements in LDAP integration 6
Implementation of hook_requirements(). Checks that ldap extension is installed during install phase only.
Parameters
string $phase:
File
- ./
ldapdata.install, line 17 - ldapdata module installation and upgrade code.
Code
function ldapdata_requirements($phase) {
if ($phase == 'install') {
$ldap_extension_loaded = extension_loaded('ldap');
$t = get_t();
$requirements = array(
'ldapdata' => 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;
}
}