function ldap_user_uninstall in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_user/ldap_user.install \ldap_user_uninstall()
Implements hook_uninstall().
File
- ldap_user/
ldap_user.install, line 80 - Install, update and uninstall functions for the LDAP User module.
Code
function ldap_user_uninstall() {
foreach (ldap_user_user_entity_fields() as $field_id => $field_conf) {
$instance = field_info_instance($field_conf['instance']['entity_type'], $field_conf['instance']['field_name'], $field_conf['instance']['bundle']);
if ($instance) {
field_delete_instance($instance);
}
$field_info = field_info_field($field_conf['field']['field_name']);
if ($field_info) {
field_delete_field($field_conf['field']['field_name']);
}
}
variable_del('ldap_user_conf');
variable_del('ldap_user_cron_last_orphan_checked');
variable_del('ldap_user_cron_last_uid_checked');
}