diff options
author | Drew Blessing <drew@blessing.io> | 2016-01-15 14:08:30 +0000 |
---|---|---|
committer | Drew Blessing <drew@blessing.io> | 2016-01-15 14:08:30 +0000 |
commit | 20106834c1a77f81068528e6512a5db78aed0306 (patch) | |
tree | 98a0f6638f5770d356a3bb7a4837008c846e1ad1 | |
parent | 4bc7d6e3c16c0a8e1ea19218de09653daf744ecd (diff) | |
parent | 2444c04055c7cc7d48c0301e8cd9d30fc534d460 (diff) | |
download | gitlab-ce-20106834c1a77f81068528e6512a5db78aed0306.tar.gz |
Merge branch 'fixKerberosSignUp' into 'master'
Fix signup using kerberos
kerberos only provides a username and an email, but no name. Therefore a signup fails because the name is empty. Best guess for the name is probably the username, therefore use it as name.
I also created an issue for this: #5945
See merge request !2336
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | lib/gitlab/o_auth/user.rb | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index d01576be67a..f9442382f20 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ v 8.4.0 (unreleased) - Expire view caches when application settings change (e.g. Gravatar disabled) (Stan Hu) - Don't notify users twice if they are both project watchers and subscribers (Stan Hu) - Remove gray background from layout in UI + - Fix signup for OAuth providers that don't provide a name - Implement new UI for group page - Implement search inside emoji picker - Add API support for looking up a user by username (Stan Hu) diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb index f1a362f5303..e3d2cc65a8f 100644 --- a/lib/gitlab/o_auth/user.rb +++ b/lib/gitlab/o_auth/user.rb @@ -141,9 +141,12 @@ module Gitlab username = auth_hash.username email = auth_hash.email end + + name = auth_hash.name + name = ::Namespace.clean_path(username) if name.strip.empty? { - name: auth_hash.name, + name: name, username: ::Namespace.clean_path(username), email: email, password: auth_hash.password, |