The username field in mantis is limited to 32 characters in the database and in the corresponding text boxes. This makes difficult for administrators who uses email as the username for mantis. In my case, I am using ldap uids which are of the form firstname.lastname@domain.tld, which generally has more than 50 characters. It would be nice if the username field size is increased to 64 characters(VARCHAR).

Additional Information

These are the list of changes to be done to attain the above feature.
Database modification:
mysql> alter table mantis_user_table change username username varchar(64);

Activities

The size of the field in the database also needs to be changed. If we are going to increase the field size, then we should increase it to the maximum size of an email address as per RFC or the maximum size allowed for a db varchar field. So, I would suggest 250.

RFC 2821 (http://tools.ietf.org/html/rfc2821) specifies that the local part of the email address can ne upto 64 characters and the domain part upto 255 characters. Combining these two will make up 319characters which may not be necessary in the near future.
So I would also suggest to use the maximum allowed size of a database VARCHAR field. I think that the maximum allowed sixe(in MySQL) is 255, am I right?

Hi, to increase the username max size on an existing installation of mantis, you just have to increase the username database field to 255 (for example) and to create a custom_constants_inc.php file with :
<?php define( 'DB_FIELD_SIZE_USERNAME', 255);
The rest is cosmetic (html input size).
Am I right ?

I am running Mantis version 1.2.8, and, as far as I have been able to perceive, the changes on the files described here are not required anymore. The files have already been updated to use a constant.

To change the size of the login field, you just need to edit the column "username" in the table "bugtracker.mantis_user_table" to the required size and then, change the constant "DB_FIELD_SIZE_USERNAME" in the file "core/constant_inc.php".

In my case, I changed the column to varchar(64) and changed the constant size to 64. And now I can create longer usernames. =)

Ps.: Just adding this comment, so that people may know how to change the username size in the new versions of Mantis.

The change to the schema file is incorrect. What you should do is add a step to the end of the schema that change the size of the username field. This way, the upgrade path works as well, and not just the new installs. In other words, the schema file should create the username with the old size, then make it larger at the end.

I would also suggest that you try using github.com to fork the code, apply your change, and then submit a pull request. This will make the process as efficient as possible.

In mantisbt 1.2.9 the size of the column "username" is 255.
But the max length of the field in the html form is limited to 32 char.
This lentgh can be modified with the constant "DB_FIELD_SIZE_USERNAME" in the file "core/constant_inc.php".
Is it possible to define this size in a user file like custom_constants_inc.php ?