diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-07 15:09:29 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-04-07 15:09:29 +0400 |
commit | a73df4f72d9d5fbc118b80cea6f6bda4f877f5df (patch) | |
tree | 109a4aa251dbbe28ded0387695959d69becac086 /app/models | |
parent | 4e002a71670587e8b1e2a97833fef059441c8ca8 (diff) |
Allow oauth signup without email
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 25c10a6faa0..295f7d783be 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -462,4 +462,12 @@ class User < ActiveRecord::Base def all_ssh_keys keys.map(&:key) end + + def temp_oauth_email? + email =~ /\Atemp-email-for-oauth/ + end + + def generate_tmp_oauth_email + self.email = "temp-email-for-oauth-#{username}" + end end |