Invalid Username with Dots

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
luke_2017
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Aug 09, 2017 7:30 pm

Invalid Username with Dots

Postby luke_2017 » Wed Aug 09, 2017 7:40 pm

I'm trying to get a social login plugin to work but it's failing when registering a user, the failure seems to be because there is a dot in the username. For example, 'lukeluke' works, but 'luke.luke' does not. I cannot find anywhere in the code that prevents this from happening... And I don't want to modify the core code...

I have checked that it is not just the plugin that is failing, as I can't create the user through the normal method either. I read somewhere it was possible to register a username as an email address too, but this is clearly not the case.

I'm running Joomla! 3.7.3 with PHP 7.1


Thanks!

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3489
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Invalid Username with Dots

Postby sozzled » Wed Aug 09, 2017 8:46 pm

1) I don't know if we've eliminated the "social login" module as a cause.

2) There are a number of extensions that are incompatible with PHP 7.1 (and it's possible that this extension you're using is one of them)

3) AFAIK it's possible to create a new user account that has an email address format.

4) J! 3.7.3 is "yesterday's news". It's out of date. Suggest that you update now to J! 3.7.4.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

luke_2017
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Aug 09, 2017 7:30 pm

Re: Invalid Username with Dots

Postby luke_2017 » Wed Aug 09, 2017 10:52 pm

Hi sozzled - thanks for the reply.

I'm actually using the 'oneall' social login plugin, which allows many different social accounts to create logins - but I don't think this is specifically the issue.

I haven't looked to see if there are any updates to PHP that change the way regex or the trim functions work, but I guess that might help as a starter.

I've tried creating a new user from within the Administration area - Setting the login name to an email address produces an error "Save failed with the following error: Please enter a valid username.". Is there anywhere that we can set the parameters for usernames, or is this core functionality?

I will update Joomla tomorrow night when I get a chance and provide an update.

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3489
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Invalid Username with Dots

Postby sozzled » Wed Aug 09, 2017 11:09 pm

Hmmm ... I asked the forum moderators to relocate this topic to the Extensions for Joomla 3.x forum category but, in hindsight, maybe this wasn't such a good idea. :-[ I'll have another look at whether it's not possible to add a new user account containing dots within it but I don't recall this being a restriction; I have an engagement soon that prevents me investigating your question at this time.

I'll get back to you in a couple of hours (make that 3+). In the meantime, you might like to search in Google to see if there's any other information on the question relating to Joomla username character restrictions and, if you find some relevant info, post it here for the benefit of others interested in knowing what we can do about this.

It may help to use the Forum Post Assistant report to give us a better picture of how you've set up your website; post the output generated by that tool here. Thanks. 8)
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3489
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Invalid Username with Dots

Postby sozzled » Thu Aug 10, 2017 4:05 am

Just to inform you I tested the "problem" on a plain, vanilla-flavoured [out-of-the-box] J! 3.7.4 website.

Test username that I used was "test.test" with the email address "test.test@test.com"

No problems at my end.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

luke_2017
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Aug 09, 2017 7:30 pm

Re: Invalid Username with Dots

Postby luke_2017 » Fri Aug 11, 2017 10:19 pm

Just to update anyone on what has happened: I also tried on a vanilla install, which worked fine - so I started working through the plugins. It turns out that one of the plugins I'm using (mediawiki bridge) also checked the new user's username against a regex which was different.

There was an option to either change the regex or just remove the check when a new user is created, so I chose the latter. In general, the solution was to find any other plugins that hook into the pre- or post-login events and check what they are doing.

Thanks for your help, sozzled.


Return to “Extensions for Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 2 guests