Index: branches/5.1.x/core/install/upgrades.sql
===================================================================
diff -u -r14479 -r14487
--- branches/5.1.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 14479)
+++ branches/5.1.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 14487)
@@ -2030,4 +2030,13 @@
 # ===== v 5.1.3-RC2 =====
 UPDATE Events
 SET l<%PRIMARY_LANGUAGE%>_Subject = 'New User Registration (<inp2:u_Field name="Login"/><inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)'
-WHERE Event = 'USER.ADD.PENDING' AND `Type` = 0 AND l<%PRIMARY_LANGUAGE%>_Subject LIKE '%<inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)%';
\ No newline at end of file
+WHERE Event = 'USER.ADD.PENDING' AND `Type` = 0 AND l<%PRIMARY_LANGUAGE%>_Subject LIKE '%<inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)%';
+
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxUserName', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', 'style="width: 50px;"', 10.03, 2, 0, NULL);
+UPDATE ConfigurationValues
+SET GroupDisplayOrder = 1, ValueList = 'style="width: 50px;"'
+WHERE VariableName = 'Min_UserName';
+
+UPDATE Phrase
+SET l<%PRIMARY_LANGUAGE%>_Translation = 'User name length (min - max)'
+WHERE PhraseKey = 'LA_TEXT_MIN_USERNAME' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Minimum user name length';
\ No newline at end of file
