How to add an "Unblock selected users" option to Views Bulk Operations

Here's a useful snippet if you want to add an "Unblock selected users" operation to Views Bulk Operations (VBO). All you need to do is create a new Rules component. To make things simple, just import the following in Rules components:

{ "rules_unblock_selected_users" : {
    "LABEL" : "Unblock selected users",
    "PLUGIN" : "action set",
    "TAGS" : [ "user" ],
    "REQUIRES" : [ "rules" ],
    "USES VARIABLES" : { "user" : { "label" : "User", "type" : "user" } },
    "ACTION SET" : [ { "user_unblock" : { "account" : [ "user" ] } } ]
  }
}

Then make sure to go to your View and edit the Bulk Operations field and include the option for "Unblock selected users." For more information on how to use Rules and VBO together, watch this Code Karate video: Drupal 7 Views Bulk Operations and Rules module integration.