1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Resolved Bug Reports' started by cedivad, Mar 3, 2014.

  1. cedivad

    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.
  2. mjda

    mjda Active Member

    Might have to do with the max length set in MySQL.
  3. Mike

    Mike XenForo Developer Staff Member

    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.)
  4. cedivad

    cedivad Active Member

    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?
  5. Mike

    Mike XenForo Developer Staff Member

    The value in the file always reflects the length in the database -- if you change one, you need to change the other.
  6. cedivad

    cedivad Active Member

    I'm guessing it to be the value in XenForo_DataWriter_User.
    '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...

Share This Page