How to change the maximum allowed length for user names

18.6.8. How to change the maximum allowed length for user names

The standard maximum length for user names is 25 characters. If your users really pick up such long nicknames, they may break your blocks' layout, depending on your theme and resolution. This is because they may appear as authors of news articles etc. in headlines that appear in various blocks.

To prevent your users from using long user names, you must change the maximum allowed length in modules/Your_Account/index.php, in the function userCheck(). Find the line:

if (strlen($username) > 25) $stop = "<center>"._NICK2LONG."</center>";

and change the 25 to a lower length. A better programming style would be to define a constant for this and do the check against the constant.


PHP-Nuke HOWTO brought to you by Chris Karakas

 

Site Info v2.2.2

Last SeenLast Seen
Server TrafficServer Traffic
  • Total: 339,281,782
  • Today: 77,409
Server InfoServer Info
  • Oct 22, 2017
  • 09:19 pm PDT
 
 

Daily Inspiration