summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNate Mow2013-09-05 00:34:30 (GMT)
committer Nate Mow2013-09-05 00:34:30 (GMT)
commitd53cd23987741ffefdf3abfa01754bb8532ee54a (patch)
treeddfd7f1231d05aa7e41a897e979ca61b873c230d
parent91ae3b0283db2b82cc6f5fc856e27ca1702506a0 (diff)
Update per #775454.
-rw-r--r--forms/advuser_admin_account.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/forms/advuser_admin_account.inc b/forms/advuser_admin_account.inc
index 788f566..d082f85 100644
--- a/forms/advuser_admin_account.inc
+++ b/forms/advuser_admin_account.inc
@@ -214,6 +214,17 @@ function advuser_admin_account_submit($form, &$form_state) {
drupal_set_message(t('All filtered users have been selected.'));
} break;
case 'block': {
+ // Menu callback is provided for mass blocking.
+ $completeForm =& $form_state['complete form']['accounts'];
+ foreach ($form_accounts as $form_user_id => $value) {
+ $selected = isset($completeForm[$form_user_id]['#value'])
+ ? $completeForm[$form_user_id]['#value']
+ : 0;
+ if ($selected) {
+ $accounts[$form_user_id] = $form_user_id;
+ }
+ }
+
foreach ($accounts as $user_id) {
$account = user_load((int)$user_id, TRUE);
if ($account !== FALSE && $account->status == 1) {
@@ -225,6 +236,17 @@ function advuser_admin_account_submit($form, &$form_state) {
$selectall = FALSE;
} break;
case 'unblock': {
+ // Menu callback is provided for mass unblocking.
+ $completeForm =& $form_state['complete form']['accounts'];
+ foreach ($form_accounts as $form_user_id => $value) {
+ $selected = isset($completeForm[$form_user_id]['#value'])
+ ? $completeForm[$form_user_id]['#value']
+ : 0;
+ if ($selected) {
+ $accounts[$form_user_id] = $form_user_id;
+ }
+ }
+
foreach ($accounts as $user_id) {
$account = user_load((int)$user_id, TRUE);
if ($account !== FALSE && $account->status == 0) {