error user account creation on registration

  • Roberto Bonazza
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 11 months ago #97856 by Roberto Bonazza
error user account creation on registration was created by Roberto Bonazza
Hello. Some users try to register by entering uppercase or even spaces in the username field on the registration form.
Events Booking accepts however the registration, but does not add the user in Joomla.
How do I add a validation Regex on username field?

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #97881 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic error user account creation on registration
Could you give us a sample username which is having this error? I don't recall Joomla core has any limitation to username, so I don't know why this issue happens

Tuan

Please Log in or Create an account to join the conversation.

  • Roberto Bonazza
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 11 months ago - 6 years 11 months ago #97886 by Roberto Bonazza
Replied by Roberto Bonazza on topic error user account creation on registration
OPS ... you're right. I made some tests and the problem is not Joomla but Moodle: we use Joomdle component to synchronize users between Joomla and Moodle (we sell residential and online courses).
Moodle has some limitations for username: can contain only lowercase alphanumeric characters, underscore, minus, dot and @.
But in Event Booking there isn't a limitation to it and if a username has an invalid character, the registration goes smoothly, but when joomdle tries to create the moodle user gets an error, and the user is not created in joomla/moodle
Is it possible to add a validation rule to username field? How can I do it?

Thank you
Roberto
Last edit: 6 years 11 months ago by Roberto Bonazza.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #97917 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic error user account creation on registration
Hello Roberto

Unfortunately, that's not supported at the moment. You will have to hire someone to customize the code if you want to implement this validation.

The method you need to customize is components/com_eventbooking/controller/controller.php, method validate_username

Regards,

Tuan
The following user(s) said Thank You: Roberto Bonazza

Please Log in or Create an account to join the conversation.

  • Roberto Bonazza
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 11 months ago #97931 by Roberto Bonazza
Replied by Roberto Bonazza on topic error user account creation on registration
I am trying to use a jQuery validation.
I saw that there is already a jQuery validation in the user name field, I created a custom regex validator in /com_eventbooking/helper/jquery.php but I can't find where I can define it to the username field

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #97957 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic error user account creation on registration
You will need to edit the code of registration form to insert that custom validation. Look at components/com_eventbooking/view/register/tmpl/register_user_registration.php , find the input for password, and insert the custom validation rule you added and it should work

Tuan

Please Log in or Create an account to join the conversation.

  • Roberto Bonazza
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 11 months ago #97984 by Roberto Bonazza
Replied by Roberto Bonazza on topic error user account creation on registration
Thank you Tuan.
It's strange: I'have modified the file /components/com_eventbooking/view/register/tmpl/register_user_registration.php adding a custom validator, but in the register page, the class still not present.
The validator works because if I add it with firebug, works as expected.
I deleted all cache file in Joomla and in the browser.
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #97992 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic error user account creation on registration
Maybe it is because you made an override for that field before? What is the code you want to add? You can submit a support ticket sending us super admin account of your site, the link to the page and tell us the code you want to add. I will have my developer to help doing the modification for you

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Roberto Bonazza
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 11 months ago #98000 by Roberto Bonazza
Replied by Roberto Bonazza on topic error user account creation on registration
Yes, it was so. I had created an override, I do not know why, perhaps during some tests in the past.
Now it works perfectly, thanks a lot.

Regards,
Roberto

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #98055 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic error user account creation on registration
Great. As long as it works, we are all happy :)

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc