How to block a spam user in wordpress

You can disable a spam user account without having to delete it. With WP Cerber Security, you can do it with just a few clicks. Blocked users will not be able to log into the website. If the blocked user is logged-in, they will be automatically logged out and redirected to the home page.You can block users on the user profile page (Edit User page), on the All Users page or on the user WP Cerber dashboard’s sessions tab. You can also add messages that will be shown when the blocked user tries to log in on the user edit page.
To block a spam user with a message 
  • Go to users admin page and find the spam user you want to block
  • Click the edit link, when the user profile page opened click the block user checkbox
  • Write the message that will be shown to the user if they try to log in. The default message is “You are not allowed to log in”. (Message might not be displayed if you use a heavily customized login)
  • Click update user button

To block spam users in bulk
  • Go to users admin page and find spam users you want to block 
  • In the username column check the appropriate checkbox
  • In bulk action drop-down list, select “Block” anc click Apply
To block currently logged in spam users
  • Open the WP Cerber Dashboard and click the Sessions tab
  •  find spam users you want to block 
  • In the user column, check the appropriate checkbox and click apply
Manage blocked user account
You can filter and manage blocked user accounts on the users admin page. Blocked users are tagged with a red BLOCKED tag. Click the blocked users link to filter out the blocked users. If you want to unblock the user you have blocked, just uncheck the block user checkbox on the user profile page.