There may be times when you need to quickly block a user from logging in. Blocking a user ensures that they can't log in, but allows the account to remain in Drupal until it needs to be deleted. All we need to know is the user ID of the account we want to block and the drush user-block command.
To block a user using Drush, we need to simply enter the following command in a terminal window:
drush user-block 2
