Seems totally reasonable, I'll update it                                                                                                                                                                                                                                                                          Sent from my BlackBerry 10 smartphone.                                                                                                                                                                                                                                        From: Dmitriy ZaporozhetsSent: Sunday, September 22, 2013 5:28 AMTo: gitlabhq/gitlabhqReply To: gitlabhq/gitlabhqCc: Izaak (John) AlpertSubject: Re: [gitlabhq] Allows username only updates to ldap properties (#5063)In lib/gitlab/ldap/user.rb:
> @@ -43,6 +43,15 @@ def find_or_create(auth)
>            user
>          end
>  
> +        def find_user(email)
> +          if user = model.find_by_email(email)

What do you think about 

user = model.find_by_email(email)

# If no user found and allow_username_or_email_login is true
# we look for user by extracting part of his email
if !user && email && ldap_conf['allow_username_or_email_login']
  uname = email.partition('@').first
  user = model.find_by_username(uname)
end

user


—Reply to this email directly or view it on GitHub.