It seems that if an LDAP user gets "LDAP blocked" intentionally or by some glitch in Gitlab then the user cannot be unblocked in the Web interface of Gitlab. This can be solved as follows on Linux.
Log onto your Linux that hosts your Gitlab, become root, and execute the following commands:
su git
cd ~/gitlab
bundle exec rails c production
Before the command "bundle exec rails c production", you may need to add the location of the file "bundle" to the variable PATH. For example, you may need to execute
export PATH=$PATH:/usr/local/bin
if the file "bundle" is in the directory /usr/local/bin.
Wait for the start of "bundle exec rails c production" and appearance of the command prompt ">". In the appeared CLI, execute the following commands:
user = User.find_by_email("myuser@example.com")
user.state = "active"
user.save
exit
Use the real email address of the user in Gitlab instead of myuser@example.com.
I found this solution and posted on
https://gitlab.com/gitlab-org/gitlab-ce/issues/13179.