gitlabhq/gitlabhq — pull request #7208 by MrMarvin (2014-06-26 14:00:19+00:00)
Title: Adds rake task to clean up deleted LDAP users

When GitLab is set up to use a LDAP for authentication and such a user is removed from LDAP, she/he is no longer able to log in to GitLab. This doesn't remove the user record from GitLab however.
As this is a common situation in enterprise environments (e.g. employees leave or move teams), it seems desirable to keep track of such users. Especially for GitLab-EE installations, which are licensed per User.

We decided that a feasable solution would be to `block!` such users, to preserve their data (projects, comments...).

This PR introduces a new Rake task under the "gitlab:cleanup" namespace which does `block!` users that are no longer found in LDAP.