Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User full name not filled out when creating new user. #179

Open
mojobiri opened this issue Jul 22, 2014 · 4 comments
Open

User full name not filled out when creating new user. #179

mojobiri opened this issue Jul 22, 2014 · 4 comments
Labels
Milestone

Comments

@mojobiri
Copy link

user.py : 370
fullname = self.arguments.get(ApiArguments.FULL_NAME, None)
ApiArguments.FULL_NAME == 'full_name'

But frontend gives us 'fullname'

And we are getting 'John Doe' for each user.

@mojobiri
Copy link
Author

And there is also no way to see 'Account Settings' for any non-admin user
Uncaught TypeError: Cannot read property 'length' of undefined
/tp/wwwstatic/js/application/modules/accountSettings.js:143

@linuxdynasty
Copy link

Thank you for reporting this issue. I will look into this and I will ask @sergiopolo if he can also take a look at this well.

@linuxdynasty linuxdynasty added this to the 0.8.x milestone Jul 23, 2014
@mojobiri
Copy link
Author

mojobiri commented Aug 4, 2014

There is also small regexp fix.

diff --git a/tp/wwwstatic/js/application/modules/modals/admin/users.js b/tp/wwwstatic/js/application/modules/modals/admin/users.js
index e10fd25..28ad8de 100644
--- a/tp/wwwstatic/js/application/modules/modals/admin/users.js
+++ b/tp/wwwstatic/js/application/modules/modals/admin/users.js
@@ -177,7 +177,7 @@ define(
                         customers = this.$el.find('select[name=customers]').select2('data'),
                         $alert = this.$('#newUserDiv').find('.help-online'),
                         params = {
-                            fullname: fullName,
+                            full_name: fullName,
                             email: email,
                             username: username,
                             password: password,
@@ -188,7 +188,7 @@ define(
                     params.group_ids = this.groupsArray;
                     params.customer_names = this.customersArray;

-                    var fullNameRegExp = /^[A-Za-z0-9 -_]+$/,
+                    var fullNameRegExp = /^[A-Za-z0-9- _]+$/,
                         userNameRegExp = /^[A-Za-z0-9-_]+$/,
                         passwordRegExp = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*[+=\\\/<>,:;\{\}'"])(?!.*\s).{8,}$/,
                         emailRegExp = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;

@linuxdynasty
Copy link

Please create a pull request and I will merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants