Skip to content

Instantly share code, notes, and snippets.

@kokel
Last active May 4, 2019 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kokel/47e4f2197dc18178df93417a00d2b89b to your computer and use it in GitHub Desktop.
Save kokel/47e4f2197dc18178df93417a00d2b89b to your computer and use it in GitHub Desktop.
7.14.3 https://gitlab.com/gitlab-org/gitlab-ce/blob/11-8-stable/doc/update/7.14-to-8.0.md
8.0.0
8.17.8 https://gitlab.com/gitlab-org/gitlab-ce/blob/11-8-stable/doc/update/8.17-to-9.0.md
9.0.0
9.5.10 https://gitlab.com/gitlab-org/gitlab-ce/blob/11-8-stable/doc/update/9.5-to-10.0.md
10.0.0
10.8.7 https://gitlab.com/gitlab-org/gitlab-ce/blob/11-8-stable/doc/update/10.8-to-11.0.md
11.0.0
11.10.4
https://gitlab.com/gitlab-org/gitlab-ce/blob/11-11-stable/doc/update/mysql_to_postgresql.md
https://gitlab.com/gitlab-org/gitlab-ce/blob/11-11-stable/doc/update/restore_after_failure.md
diff --git a/lib/gitlab/o_auth/auth_hash.rb b/lib/gitlab/o_auth/auth_hash.rb
index 9b8e783..95984cf 100644
--- a/lib/gitlab/o_auth/auth_hash.rb
+++ b/lib/gitlab/o_auth/auth_hash.rb
@@ -49,6 +49,10 @@ module Gitlab
username = get_info(:nickname) || get_info(:username)
email = get_info(:email)
+ email ||= "#{@uid.match(/uid=([^,]+),/)[1] }@example.com"
+
username ||= generate_username(email) if email
email ||= generate_temporarily_email(username) if username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment