function advuser_admin_account_submit in Advanced User 5.2
Same name and namespace in other branches
- 6.3 forms/advuser_admin_account.inc \advuser_admin_account_submit()
- 6.2 advuser.module \advuser_admin_account_submit()
- 7.3 forms/advuser_admin_account.inc \advuser_admin_account_submit()
Submit the user administration update form.
File
- ./
advuser.module, line 259 - Advanced user module allows you to select users based on an advanced set of filtering and apply actions to block, unblock, delete or email the selected users.
Code
function advuser_admin_account_submit($form_id, $form_values) {
$operations = module_invoke_all('user_operations');
$operations = array_merge($operations, module_invoke_all('advuser_operations'));
$operation = $operations[$form_values['operation']];
// Filter out unchecked accounts.
$accounts = array_filter($form_values['accounts']);
if ($function = $operation['callback']) {
// Add in callback arguments if present.
if (isset($operation['callback arguments'])) {
$args = array_merge(array(
$accounts,
), $operation['callback arguments']);
}
else {
$args = array(
$accounts,
);
}
call_user_func_array($function, $args);
cache_clear_all('*', 'cache_menu', TRUE);
drupal_set_message(t('The update has been performed.'));
}
}