Boomer12 Posted February 13, 2016 Posted February 13, 2016 Please add the capability to control how long a username needs to be minimum.
Colonel_mortis Posted February 13, 2016 Posted February 13, 2016 6 minutes ago, superj707 said: Max would be nice too. There already is a max (members->profile->profile settings), but a minimum is really important too - for a start, it's more difficult to search for a member with a short name.
Boomer12 Posted February 13, 2016 Author Posted February 13, 2016 Yep, they need to make a hard limit with minimum 3 characters, cause when it's lower, MySQL can't find them
Ahmad E. Posted February 13, 2016 Posted February 13, 2016 For those who cannot wait: Username Minimum Lenght.xml
Boomer12 Posted February 13, 2016 Author Posted February 13, 2016 Really great community here. Would you ship that into the marketplace? Or would it be denied cause of quick&dirty implementation?
Daniel F Posted February 13, 2016 Posted February 13, 2016 1 hour ago, Ahmad E. said: For those who cannot wait: Username Minimum Lenght.xml Nice one:) I hope i'm allowed to post some critique This is changing only the core registration form; users created while the commerce checkout, users created via the acp and probably users created via login handlers won't have this check (not sure about the login handler users). I can garantee that this will cause troubles:D . Another issue is, that you're overwriting the whole username element. This will conflict with other hooks doing the same... I would suggest to hook into \IPS\Helpers\Form\Text and to add your validation code direct to this class when the accountUsername option is set 3. You've left some debugcode in your plugin $form->add( new \IPS\Helpers\Form\Text( 'test', NULL, TRUE, array( 'minLength' => \IPS\Settings::i()->usernameMinLength ?: 3 ) ) );
Ahmad E. Posted February 13, 2016 Posted February 13, 2016 Thanks for the hints. A little cleaned up version: Username Minimum Lenght.xml
Recommended Posts
Archived
This topic is now archived and is closed to further replies.