--- user.module 2009-07-07 00:03:55.000000000 +0000
+++ userNew.module      2009-07-07 00:04:54.000000000 +0000
@@ -2236,6 +2236,12 @@ function user_action_info() {
       'configurable' => FALSE,
       'hooks' => array(),
     ),
+    'user_unblock_user_action' => array(
+      'description' => t('Unblock current user'),
+      'type' => 'user',
+      'configurable' => FALSE,
+      'hooks' => array(),
+    ),
     'user_block_ip_action' => array(
       'description' => t('Ban IP address of current user'),
       'type' => 'user',
@@ -2267,6 +2273,26 @@ function user_block_user_action(&$object

 /**
  * Implementation of a Drupal action.
+ * Unblocks the current user.
+ */
+function user_unblock_user_action(&$object, $context = array()) {
+  if (isset($object->uid)) {
+    $uid = $object->uid;
+  }
+  elseif (isset($context['uid'])) {
+    $uid = $context['uid'];
+  }
+  else {
+    global $user;
+    $uid = $user->uid;
+  }
+  db_query("UPDATE {users} SET status = 1 WHERE uid = %d", $uid);
+  sess_destroy_uid($uid);
+  watchdog('action', 'Unblocked user %name.', array('%name' => check_plain($user->name)));
+}
+
+/**
+ * Implementation of a Drupal action.
  * Adds an access rule that blocks the user's IP address.
  */
 function user_block_ip_action() {
