Skip to content

Commit

Permalink
Sign user in after signup
Browse files Browse the repository at this point in the history
  • Loading branch information
ryw committed Oct 16, 2013
1 parent 0167b45 commit f4ba75e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sign-up/signUp.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ Template.entrySignUp.events
Session.set('entryError', err.reason)
return


#login on client
if _.contains([
'USERNAME_AND_EMAIL',
'USERNAME_AND_OPTIONAL_EMAIL',
'EMAIL_ONLY'], Accounts.ui._options.passwordSignupFields)
Meteor.loginWithPassword(email, password)
else
Meteor.loginWithPassword(username, password)

Router.go(Session.get('entrySettings').dashboardRoute)
)
else
Expand Down

0 comments on commit f4ba75e

Please sign in to comment.