function advuser_uninstall in Advanced User 7.3
Same name and namespace in other branches
- 5.2 advuser.install \advuser_uninstall()
- 6.3 advuser.install \advuser_uninstall()
- 6.2 advuser.install \advuser_uninstall()
Implementation of hook_uninstall().
Remove the variables from the variable table.
File
- ./
advuser.install, line 12 - Supply the hooks for uninstall.
Code
function advuser_uninstall() {
/**
* It would be nice to use variable_del here but variable_del is expensive
* since it calls cache_clear_all('variables', 'cache') with each one.
* Therefore we'll stick with the db_delete and call the cache_clear_all once
* it is completed.
*
* variable_del('advuser_allow_list_uid1');
* variable_del('advuser_listno');
* variable_del('advuser_log_notifications');
* variable_del('advuser_modify_mail');
* variable_del('advuser_modify_notify');
* variable_del('advuser_modify_subject');
* variable_del('advuser_new_mail');
* variable_del('advuser_new_notify');
* variable_del('advuser_new_subject');
* variable_del('advuser_nobody_from_address');
* variable_del('advuser_notify_uid1');
* variable_del('advuser_profile_fields');
* variable_del('advuser_reset_never_access');
* variable_del('advuser_senders_from_address');
* variable_del('advuser_set_never_access');
* cache_clear_all('variables', 'cache');
*/
db_delete('variable')
->condition('name', 'advuser_%', 'LIKE')
->execute();
cache_clear_all('variables', 'cache');
}