function advuser_uninstall in Advanced User 6.3
Same name and namespace in other branches
- 5.2 advuser.install \advuser_uninstall()
- 6.2 advuser.install \advuser_uninstall()
- 7.3 advuser.install \advuser_uninstall()
Implementation of hook_uninstall().
Remove the variables from the variable table.
File
- ./
advuser.install, line 8
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_query 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');
*/
$delete_variables = "DELETE FROM {variable} WHERE name LIKE 'advuser_%'";
db_query($delete_variables);
cache_clear_all('variables', 'cache');
}