function user_user_operations_unblock in Drupal 5
Same name and namespace in other branches
- 6 modules/user/user.module \user_user_operations_unblock()
- 7 modules/user/user.module \user_user_operations_unblock()
Callback function for admin mass unblocking users.
1 string reference to 'user_user_operations_unblock'
- user_user_operations in modules/
user/ user.module - Implementation of hook_user_operations().
File
- modules/
user/ user.module, line 2247 - Enables the user registration and login system.
Code
function user_user_operations_unblock($accounts) {
foreach ($accounts as $uid) {
$account = user_load(array(
'uid' => (int) $uid,
));
// Skip unblocking user if they are already unblocked.
if ($account !== FALSE && $account->status == 0) {
user_save($account, array(
'status' => 1,
));
}
}
}