Index: admin_templates/config/custom_variables.tpl
===================================================================
--- admin_templates/config/custom_variables.tpl (revision 14472)
+++ admin_templates/config/custom_variables.tpl (working copy)
@@ -78,3 +78,7 @@
+
+
+ -
+
\ No newline at end of file
Index: install/english.lang
===================================================================
--- install/english.lang (revision 14472)
+++ install/english.lang (working copy)
@@ -1223,7 +1223,7 @@
VXNlcm5hbWU=
RGVmYXVsdCBNRVRBIGtleXdvcmRz
TWluaW11bSBwYXNzd29yZCBsZW5ndGg=
- TWluaW11bSB1c2VyIG5hbWUgbGVuZ3Ro
+ VXNlciBuYW1lIGxlbmd0aCAobWluIC0gbWF4KQ==
U2hvdyBtdWx0aXBsZQ==
TmV3
Tm9uZQ==
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 14472)
+++ install/install_data.sql (working copy)
@@ -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: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 14472)
+++ install/upgrades.sql (working copy)
@@ -2025,4 +2025,14 @@
# ===== v 5.1.3-B2 =====
ALTER TABLE Modules ADD AppliedDBRevisions TEXT NULL;
-# ===== v 5.1.3-RC1 =====
\ No newline at end of file
+# ===== v 5.1.3-RC1 =====
+
+# ===== v 5.1.3-RC2 =====
+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: units/users/users_event_handler.php
===================================================================
--- units/users/users_event_handler.php (revision 14472)
+++ units/users/users_event_handler.php (working copy)
@@ -1394,7 +1394,10 @@
$fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (CountryStateId = '.$first_country.', 1, 0) DESC, \\1', $fields['Country']['options_sql']);
}
+ $max_username = $this->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