Skip to content

Commit

Permalink
Adding new settings for username and email Insensitive, adding check …
Browse files Browse the repository at this point in the history
…to signUp to make the username and email insensitive if needed
  • Loading branch information
bshardi committed Feb 27, 2014
1 parent 089cfe1 commit c5cbb06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/entry.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ AccountsEntry =
homeRoute: '/home'
dashboardRoute: '/dashboard'
passwordSignupFields: 'EMAIL_ONLY'
emailInsensitive: true
usernameInsensitive: false


config: (appConfig) ->
@settings = _.extend(@settings, appConfig)
Expand Down
3 changes: 3 additions & 0 deletions client/views/signUp/signUp.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Template.entrySignUp.events
t.find('input[name="username"]').value.toLowerCase()
else
undefined
if username && AccountsEntry.settings.usernameInsensitive then username = username.toLowerCase()

signupCode =
if t.find('input[name="signupCode"]')
Expand All @@ -57,6 +58,8 @@ Template.entrySignUp.events
undefined

email = t.find('input[type="email"]').value
if AccountsEntry.settings.emailInsensitive then email = email.toLowerCase()

password = t.find('input[type="password"]').value

fields = AccountsEntry.settings.passwordSignupFields
Expand Down

0 comments on commit c5cbb06

Please sign in to comment.