mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
test username first, before facebook
This commit is contained in:
parent
b1cbadb2d1
commit
5546031ddb
1 changed files with 4 additions and 4 deletions
|
|
@ -40,11 +40,11 @@ get '/:uid?', (page, model, {uid}, next) ->
|
|||
#FIXME remove this eventually, part of user schema
|
||||
user.setNull 'balance', 2
|
||||
# support legacy Everyauth schema (now using derby-auth, Passport)
|
||||
if fb = user.get('auth.facebook')
|
||||
model.set('_loginName', if fb._raw then "#{fb.name.givenName} #{fb.name.familyName}" else fb.name)
|
||||
else if username = user.get('auth.local.username')
|
||||
if username = user.get('auth.local.username')
|
||||
model.set('_loginName', username)
|
||||
|
||||
else if fb = user.get('auth.facebook')
|
||||
model.set('_loginName', if fb._raw then "#{fb.name.givenName} #{fb.name.familyName}" else fb.name)
|
||||
|
||||
# Setup Item Store
|
||||
model.set '_items'
|
||||
armor: content.items.armor[parseInt(user.get('items.armor')) + 1]
|
||||
|
|
|
|||
Loading…
Reference in a new issue