Index: branches/5.1.x/core/install/install_data.sql
===================================================================
diff -u -r14402 -r14487
--- branches/5.1.x/core/install/install_data.sql (.../install_data.sql) (revision 14402)
+++ branches/5.1.x/core/install/install_data.sql (.../install_data.sql) (revision 14487)
@@ -100,7 +100,8 @@
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdvancedUserManagement', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_AdvancedUserManagement', 'checkbox', NULL, NULL, 10.011, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_use_emails_as_login', 'checkbox', NULL, NULL, 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RegistrationCaptcha', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_registration_captcha', 'checkbox', NULL, NULL, 10.025, 0, 0, NULL);
-INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Min_UserName', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', '', 10.03, 0, 0, NULL);
+INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Min_UserName', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', 'style="width: 50px;"', 10.03, 1, 0, NULL);
+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);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Min_Password', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_password', 'text', '', '', 10.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 10.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UserEmailActivationTimeout', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_UserEmailActivationTimeout', 'text', NULL, NULL, 10.051, 0, 0, NULL);
Index: branches/5.1.x/core/units/users/users_event_handler.php
===================================================================
diff -u -r14445 -r14487
--- branches/5.1.x/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 14445)
+++ branches/5.1.x/core/units/users/users_event_handler.php (.../users_event_handler.php) (revision 14487)
@@ -1,6 +1,6 @@
Application->ConfigValue('MaxUserName');
$fields['Login']['min_len'] = $this->Application->ConfigValue('Min_UserName');
+ $fields['Login']['max_len'] = $max_username ? $max_username : 255;
+
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
// 2. set default user registration group
Index: branches/5.1.x/core/admin_templates/config/custom_variables.tpl
===================================================================
diff -u -r14241 -r14487
--- branches/5.1.x/core/admin_templates/config/custom_variables.tpl (.../custom_variables.tpl) (revision 14241)
+++ branches/5.1.x/core/admin_templates/config/custom_variables.tpl (.../custom_variables.tpl) (revision 14487)
@@ -78,3 +78,7 @@
+
+
+ -
+
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 ( - Activation Email)'
-WHERE Event = 'USER.ADD.PENDING' AND `Type` = 0 AND l<%PRIMARY_LANGUAGE%>_Subject LIKE '% - Activation Email)%';
\ No newline at end of file
+WHERE Event = 'USER.ADD.PENDING' AND `Type` = 0 AND l<%PRIMARY_LANGUAGE%>_Subject LIKE '% - Activation Email)%';
+
+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
Index: branches/5.1.x/core/install/english.lang
===================================================================
diff -u -r14479 -r14487
--- branches/5.1.x/core/install/english.lang (.../english.lang) (revision 14479)
+++ branches/5.1.x/core/install/english.lang (.../english.lang) (revision 14487)
@@ -1223,7 +1223,7 @@
VXNlcm5hbWU=
RGVmYXVsdCBNRVRBIGtleXdvcmRz
TWluaW11bSBwYXNzd29yZCBsZW5ndGg=
- TWluaW11bSB1c2VyIG5hbWUgbGVuZ3Ro
+ VXNlciBuYW1lIGxlbmd0aCAobWluIC0gbWF4KQ==
U2hvdyBtdWx0aXBsZQ==
TmV3
Tm9uZQ==