diff -u b/modules/user/user.module b/modules/user/user.module --- b/modules/user/user.module +++ b/modules/user/user.module @@ -3715,12 +3715,6 @@ 'configurable' => FALSE, 'triggers' => array('any'), ), - 'user_unblock_user_action' => array( - 'label' => t('Unblock current user'), - 'type' => 'user', - 'configurable' => FALSE, - 'triggers' => array('any'), - ), ); } @@ -3733,6 +3727,12 @@ 'configurable' => FALSE, 'triggers' => array('any'), ), + 'user_unblock_user_action' => array( + 'label' => t('Unblock current user'), + 'type' => 'user', + 'configurable' => FALSE, + 'triggers' => array('any'), + ), ); } @@ -3757,7 +3757,7 @@ elseif (isset($context['uid'])) { $uid = $context['uid']; } - // If neither of those are valid, then block the current user. + // If neither of those are valid, then unblock the current user. else { $uid = $GLOBALS['user']->uid; } diff -u b/modules/user/user.test b/modules/user/user.test --- b/modules/user/user.test +++ b/modules/user/user.test @@ -2601,14 +2601,18 @@ // Block a user. user_block_user_action($unblocked_user); + clearstatcache(); $blocked_user = user_load($unblocked_user->uid); $this->assertEqual($blocked_user->status, 0, 'User is blocked'); + $this->assertWatchdogMessage('Blocked user %name.', array('%name' => $blocked_user->name), 'Found watchdog message'); // Unblock a user. user_unblock_user_action($blocked_user); + clearstatcache(); $unblocked_user = user_load($unblocked_user->uid); $this->assertEqual($unblocked_user->status, 1, 'User is unblocked'); + $this->assertWatchdogMessage('Unblocked user %name.', array('%name' => $unblocked_user->name), 'Found watchdog message'); } /**