Gitlab requires an email address for all user accounts as this is the
default account id and is used for sending notifications. LDAP accounts
may be missing email fields so handle this by showing a sensible error
message before redirecting to the login screen again.
Resolves github issue #899
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This helps with compatibility with more LDAP providers as the implementation
doesn't depend on the exact names of the LDAP fields. The LDAP strategy
helps maps the attributes to the fields in the info object and we use the
info object to get the email and name.
This makes the LDAP auth compatible with most OpenLDAP servers as well.