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 login less than 4 letters #845

Closed
mamasw opened this issue Mar 24, 2015 · 5 comments
Closed

user login less than 4 letters #845

mamasw opened this issue Mar 24, 2015 · 5 comments

Comments

@mamasw
Copy link

mamasw commented Mar 24, 2015

Hello.

I have just installed humhub. Is it possible to change user login length requirement to be less than 4 letters?

Cheers.

@WASasquatch
Copy link
Contributor

Yes its just a form check. I'm on my phone but check out
protected/modules_core/user/auth
On Mar 23, 2015 11:56 PM, "mamasw" notifications@github.com wrote:

Hello.

I have just installed humhub. Is it possible to change login requirement
of user login to be less than 4 letters?

Cheers.


Reply to this email directly or view it on GitHub
#845.

@mamasw
Copy link
Author

mamasw commented Mar 24, 2015

I have found something in /protected/modules_core/user/models/User.php. Can you please check is this a only one file where this value is checked?

@WASasquatch
Copy link
Contributor

Yes, that is it.

$rules[] = array('username', 'length', 'max' => 25, 'min' => 4);

to

$rules[] = array('username', 'length', 'max' => 25, 'min' => 3);

Or whatever.

@mamasw
Copy link
Author

mamasw commented Mar 24, 2015

thank you for helping me :) Its working.

@WASasquatch
Copy link
Contributor

Glad I could help. Maybe this should be a setting under authentication settings of the admin center @luke- ?

I know some people use short nicknames, for example mine is "WAS". I had to make this same edit, though for the ease of updating I just use my full username now. But maybe even then, some people maybe want to limit usernames at 7 characters to keep things unique rather then 4. Who knows.

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

3 participants