As designed Max username lenght option is not applied in ACP edit user function

cedivad

Active member
Try to go to the options and set 100 as max username length, then try to edit a user in the admin panel, it will complain that the max usernane lenght is 50.
 
That is correct - the max length is always 50 characters based on the column length. Any changes would require modification to the DB and files. (I have added a note mentioning this to the option.)
 
I'm ok with manually editing the database, but don't you think that you should replace the hardcoded 50 in the files with the value of that setting?
 
The value in the file always reflects the length in the database -- if you change one, you need to change the other.
 
I'm guessing it to be the value in XenForo_DataWriter_User.
Code:
'username' => array( 'maxLength' => 50)
My question is simply why not to use a variable there instead of the hardcoded value? Just specific in the ACP that values longer than 50 requires a database modification...
 
Top Bottom