projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5ec75e
)
3153: return nil if no unique username can be derived from an email address. no setup...
author
radhika <radhika@curoverse.com>
Thu, 21 Aug 2014 22:25:16 +0000
(18:25 -0400)
committer
radhika <radhika@curoverse.com>
Thu, 21 Aug 2014 22:25:16 +0000
(18:25 -0400)
services/api/app/models/user.rb
patch
|
blob
|
history
diff --git
a/services/api/app/models/user.rb
b/services/api/app/models/user.rb
index b41c7e511647b99166fc59e092dd8708493636cc..7b894ca9a79fc54e05de720e8ae94b2a538f47c1 100644
(file)
--- a/
services/api/app/models/user.rb
+++ b/
services/api/app/models/user.rb
@@
-437,7
+437,7
@@
class User < ArvadosModel
elsif !(/^[a-zA-Z][-._a-zA-Z0-9]{0,30}[a-zA-Z0-9]$/.match(username))
return true
else
- username = derive_unique_username username
+ return true if !(username = derive_unique_username username)
end
end
@@
-473,7
+473,7
@@
class User < ArvadosModel
username = orig_username + SecureRandom.random_number(1000).to_s
end
- return
usernam
e
+ return
nil # count expired and no unused username was availabl
e
end
# Send notification if the user saved profile for the first time