How to get notified when a user is blocked? Is there a way to get notified when a user is blocked ? like a hook in user module or ? or there are another way ?
There is hook_user_update() for this. Below is an example on how you can use it for your purpose:

/**
 * Implements hook_user_update().
 */
function my_module_user_update(&amp;$edit, $account, $category) {
  // Check if the user was blocked
  if ($account-&gt;original-&gt;status != $account-&gt;status &amp;&amp; $account-&gt;status == 0) {
    // Handle notification here
  }
}


To send an email programmatically from Drupal, you can check out this question.

Another way to do this, would be by using the Rules module and following the steps below:


Create a new rule that reacts on the user event "After updating an existing user account".
Add a condition of type "User is blocked" and save it with the defaults.
Add another condition of type "User is blocked", but this time use "account-unchanged" for the Data Selector and check the Negate checkbox.
Add an action of type System > "Send mail" and play with it.