diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-06-01 17:56:00 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-06-03 06:46:41 +0200 |
commit | 7f6929608c6423505778722dd4cb7bf8e837729e (patch) | |
tree | 67b1cca95c23e79e939a579c651ecbe42e37c8dd /client/config/accounts.js | |
parent | 5f09c0ce406075bbd1ed9061f444e615375aa2d3 (diff) | |
download | wekan-7f6929608c6423505778722dd4cb7bf8e837729e.tar.gz wekan-7f6929608c6423505778722dd4cb7bf8e837729e.tar.bz2 wekan-7f6929608c6423505778722dd4cb7bf8e837729e.zip |
Work on the user account system
Allow a user to modifies its name, username, initials, and password.
Fixes username handling on sandstorm.
Fixes #149.
Diffstat (limited to 'client/config/accounts.js')
-rw-r--r-- | client/config/accounts.js | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/client/config/accounts.js b/client/config/accounts.js index 9e0d17d3..5e6edd39 100644 --- a/client/config/accounts.js +++ b/client/config/accounts.js @@ -1,35 +1,19 @@ +var passwordField = AccountsTemplates.removeField('password'); +var emailField = AccountsTemplates.removeField('email'); +AccountsTemplates.addFields([{ + _id: 'username', + type: 'text', + displayName: 'username', + required: true, + minLength: 5 +}, emailField, passwordField]); + AccountsTemplates.configure({ confirmPassword: false, enablePasswordChange: true, sendVerificationEmail: true, - showForgotPasswordLink: true -}); - -AccountsTemplates.removeField('password'); -AccountsTemplates.removeField('email'); -AccountsTemplates.addFields([ - { - _id: 'username', - type: 'text', - displayName: 'username', - required: true, - minLength: 5 - }, - { - _id: 'email', - type: 'email', - required: true, - displayName: 'email', - re: /.+@(.+){2,}\.(.+){2,}/, - errStr: 'Invalid email' - }, - { - _id: 'password', - type: 'password', - placeholder: { - signUp: 'At least six characters' - }, - required: true, - minLength: 6 + showForgotPasswordLink: true, + onLogoutHook: function() { + Router.go('Home'); } -]); +}); |