mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-21 13:18:53 +00:00
fix legacy facebook name bug
This commit is contained in:
parent
35039e6af6
commit
2bece89b37
2 changed files with 5 additions and 8 deletions
|
|
@ -39,6 +39,10 @@ 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)
|
||||
fb = user.get('auth.facebook')
|
||||
if fb
|
||||
model.set('_loginName', if fb._raw then "#{fb.name.givenName} #{fb.name.familyName}" else fb.name)
|
||||
|
||||
# Setup Item Store
|
||||
model.set '_items'
|
||||
|
|
|
|||
|
|
@ -16,14 +16,7 @@
|
|||
<a href="/auth/facebook"><img src='/img/facebook-login-register.jpeg' alt="Login / Register With Facebook"/></a>
|
||||
{else}
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-small">
|
||||
{#if _user.auth.facebook.name.giveName}
|
||||
{_user.auth.facebook.name.givenName} {_user.auth.facebook.name.familyName}
|
||||
{else}
|
||||
<!-- support legacy Everyauth schema (now using derby-auth, Passport) -->
|
||||
{_user.auth.facebook.name}
|
||||
{/}
|
||||
</button>
|
||||
<button class="btn btn-small">{_loginName}</button>
|
||||
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue