user_user_operations_block
function user_user_operations_block
user_user_operations_block($accounts)
Callback function for admin mass blocking users.
File
- modules/user/user.module, line 3289
- Enables the user registration and login system.
Code
function user_user_operations_block($accounts) { $accounts = user_load_multiple($accounts); foreach ($accounts as $account) { // Skip blocking user if they are already blocked. if ($account !== FALSE && $account->status == 1) { // For efficiency manually save the original account before applying any // changes. $account->original = clone $account; user_save($account, array('status' => 0)); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/user_user_operations_block/7.x