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

Please improve the user component to put some restriction on the registration form #14275

Closed
joomlagate opened this issue Feb 28, 2017 · 12 comments

Comments

@joomlagate
Copy link

joomlagate commented Feb 28, 2017

Steps to reproduce the issue

Register a new user account through Joomla core registration form (com_users).

Expected result

You can not use special character (like: empty space) in "username" field;
You can not input a "Name" longer than 20 (or 30) characters;
You can not use email address under certain domains (like: @mail.ru );
...

Actual result

You can use neary ANY character in "username" and "Name" field;
You can input a "Name" longer than 60 characters!
You can use ANY email address!
...

The Joomla website Admin can NOT put any restriction on the registration form!

System information (as much as possible)

Joomla 3.6.5
PHP 7.0.15

Additional comments

Could you please improve the com_users component to allow more options/restrictions on the user registration process?

Thank you.

@Spudley
Copy link
Contributor

Spudley commented Feb 28, 2017

There are existing plugins that can do this. For example, this one: https://extensions.joomla.org/extensions/extension/access-a-security/site-access/registration-validation-pro/. (there are probably others, but I already know about that one and I didn't have time to search too deeply)

@joomlagate
Copy link
Author

Did you noticed that plugin has not been updated for almost 2 years? Not to mention that it is a Paid Download one.

I think the Joomla core SHOULD put some restriction on the "username" field at least, because users can NOT edit the "username" value after registration, but they can edit "Name" and "Email". In order to avoid "weird" usernames, there MUST be some rules on it.

Thank you.

@arrowthemes
Copy link
Contributor

+1

@Spudley
Copy link
Contributor

Spudley commented Mar 3, 2017

I haven't modified the Joomla core, but I have written a plugin for you that should do what you want.

Please see https://github.com/Spudley/plg_user_restrictusername

Have tested it locally, but it could probably use a bit more testing. I don't have time for that right now, but thought I should let you take a look anyway.

Let me know what you think. Hopefully it meets your needs.

@PhilETaylor

This comment was marked as abuse.

@Spudley
Copy link
Contributor

Spudley commented Mar 4, 2017

@PhilETaylor that's how I interpreted it.

@yvesh
Copy link
Member

yvesh commented Mar 4, 2017

Yep, sounds like a feature request.

You can use neary ANY character in "username" and "Name" field;

This are the rules:

No space at beginning or end, at least 2 characters and must not contain the following characters: < > \ " ' % ; ( ) &.

You can't change that behavior without massive b/c issues.. and the usernames are working, so i see no issue..

You can not input a "Name" longer than 20 (or 30) characters;

The hard limit is 400 (in the database column).. You don't know how long names get, maybe some one uses are company name or url in there.. Changing this behavior would also be b/c..

You can use ANY email address!

There are millions of valid mail ru users ;)

What you are asking for is in my opinion nothing for core.. If you need customization you can use 3rd party plugins etc.

@dgrammatiko
Copy link
Contributor

@baijianpeng @yvesh as of 3.7 any text field can have a pattern which the validator will check against it, according to #13094. The missing link here for fully customisable form fields is a way to override the fields properties similar to the layouts. I know @phproberto has some working code for this, so I'm kindly asking him to make a PR

@martinlines
Copy link

a2-f9-m-95505b10885104ca3ec56d8e3f05a64f55a64eac

Spamming is really getting out of hand

@ot2sen
Copy link
Contributor

ot2sen commented Apr 12, 2018

@martinlines Activate the inbuilt Captcha and try see what happens. You will be positively surpriced how well it works on the issue you see ;)

@ghost
Copy link

ghost commented Apr 13, 2018

@martinlines Please ask help on the forums. This repository concerns in first Place Joomla-Core coding, thanks.

@Bakual
Copy link
Contributor

Bakual commented Apr 13, 2018

I'm closing this issue as it is not something we will do in core.
Also there are already existing solutions both in core (captcha) and 3rd party (spam control extensions) which will help with the original issue.

@Bakual Bakual closed this as completed Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests