ldapsync.install in LDAP integration 6
ldapsync module installation and upgrade code.
File
ldapsync.installView source
<?php
/**
* @file
* ldapsync module installation and upgrade code.
*/
//////////////////////////////////////////////////////////////////////////////
// Core API hooks
/**
* Implementation of hook_requirements().
* Checks that ldap extension is installed during install phase only.
*
* @param string $phase
*/
function ldapsync_requirements($phase) {
if ($phase == 'install') {
$ldap_extension_loaded = extension_loaded('ldap');
$t = get_t();
$requirements = array(
'ldapsyncs' => 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;
}
}
/**
* Implementation of hook_uninstall().
*/
function ldapsync_uninstall() {
$ret = array();
variable_del('ldapsync_time_interval');
variable_del('ldapsync_last_sync_time');
variable_del('ldapsync_existing_only');
variable_del('ldapsync_login_conflict');
variable_del('ldapsync_missing_users_action');
variable_del('ldapsync_load_user_by');
variable_del('ldapsync_filter');
variable_del('ldapsync_filter_append_default');
return $ret;
}
Functions
Name | Description |
---|---|
ldapsync_requirements | Implementation of hook_requirements(). Checks that ldap extension is installed during install phase only. |
ldapsync_uninstall | Implementation of hook_uninstall(). |