Search code examples
liferayliferay-6

liferay increase username length


I am aware that liferay concatenates the firstname with lastname for the username fields example the one found in table contact.

I need the username to be > 75 characters long (which is the default column length) as the first name and last name have to be at <= 40 characters long.

I tried to manually increase the column width but I get exceptions that another column related to length is too short. I am aware of the portal-model-hints.xml file to resize a column for example, but I am sure there is a better way to modify all the columns at one go.

Thanks.


Solution

  • This should help you. Altering the DB once set up is done and adding a hook to change the validation logic. Refer the link provided.