function userprotect_protected_users_delete_form in User protect 6
Same name and namespace in other branches
- 5 userprotect.module \userprotect_protected_users_delete_form()
- 7 userprotect.admin.inc \userprotect_protected_users_delete_form()
Menu callback. Removes a user from being protected, or removes an administrator bypass.
1 string reference to 'userprotect_protected_users_delete_form'
- userprotect_menu in ./
userprotect.module - Implementation of hook_menu().
File
- ./
userprotect.module, line 723
Code
function userprotect_protected_users_delete_form(&$form_state, $account, $type = 'user') {
if ($type == 'user') {
$type_display = t('protections');
$admin_page = 'protected_users';
}
elseif ($type == 'admin') {
$type_display = t('administrator bypass');
$admin_page = 'administrator_bypass';
}
$form_state['userprotect']['account'] = $account;
$form_state['userprotect']['type'] = $type;
$form_state['userprotect']['type_display'] = $type_display;
$form_state['userprotect']['admin_page'] = $admin_page;
return confirm_form(array(), t('Are you sure you want to delete the individual !type for %user?', array(
'!type' => $type_display,
'%user' => $account->name,
)), "admin/user/userprotect/{$admin_page}");
}