Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
Boomer12 Posted February 13, 2016 Share Posted February 13, 2016 Please add the capability to control how long a username needs to be minimum. Link to comment Share on other sites More sharing options...
SJ77 Posted February 13, 2016 Share Posted February 13, 2016 Max would be nice too. Link to comment Share on other sites More sharing options...
Colonel_mortis Posted February 13, 2016 Share 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. Link to comment Share on other sites More sharing options...
Boomer12 Posted February 13, 2016 Author Share 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 Link to comment Share on other sites More sharing options...
Ahmad E. Posted February 13, 2016 Share Posted February 13, 2016 For those who cannot wait: Username Minimum Lenght.xml Link to comment Share on other sites More sharing options...
Boomer12 Posted February 13, 2016 Author Share 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? Link to comment Share on other sites More sharing options...
Daniel F Posted February 13, 2016 Share 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 ) ) ); Link to comment Share on other sites More sharing options...
Ahmad E. Posted February 13, 2016 Share Posted February 13, 2016 Thanks for the hints. A little cleaned up version: Username Minimum Lenght.xml Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.