Index: admin_templates/login.tpl
===================================================================
--- admin_templates/login.tpl (revision 14705)
+++ admin_templates/login.tpl (working copy)
@@ -135,11 +135,11 @@
- : |
+ : |
|
- : |
+ : |
|
Index: install/english.lang
===================================================================
--- install/english.lang (revision 14726)
+++ install/english.lang (working copy)
@@ -174,6 +174,7 @@
Q29tbWVudHMgcGVyIHBhZ2U=
UXVpY2sgU2VjdGlvbiBQZXJtaXNzaW9uIFJlYnVpbGQ=
IlJlY3ljbGUgQmluIiBTZWN0aW9uSWQ=
+ VXNlcm5hbWUgUmVxdWlyZWQgRHVyaW5nIFJlZ2lzdHJhdGlvbg==
UmVzdG9yZSBsYXN0IHZpc2l0ZWQgQWRtaW4gU2VjdGlvbiBhZnRlciBMb2dpbg==
UmVxdWlyZSBTU0wgZm9yIEFkbWluaXN0cmF0aXZlIENvbnNvbGU=
UmVxdWlyZSBTU0wgZm9yIGxvZ2luICYgY2hlY2tvdXQ=
@@ -358,6 +359,7 @@
RWxhcHNlZCBUaW1l
RS1tYWls
RS1tYWlsIENvbW11bmljYXRpb24gUm9sZQ==
+ RS1tYWlsIG9yIFVzZXJuYW1l
RS1tYWlsICI8c3Ryb25nPntwYXNzd29yZH08L3N0cm9uZz4iIHBhc3N3b3JkIHRvIHVzZXI=
RW1haWxzIGluIFF1ZXVl
RW1haWxzIFNlbnQ=
@@ -914,7 +916,6 @@
TmV3ZXN0IFVzZXIgRGF0ZQ==
Q3VycmVudGx5IEFjdGl2ZSBVc2VyIFNlc3Npb25z
T3ZlcndyaXRlIEV4aXN0aW5nIFBocmFzZXM=
- UGFzc3dvcmQ=
UGVuZGluZyBTZWN0aW9ucw==
UGVuZGluZyBJdGVtcw==
UGVyZm9ybSB0aGlzIG9wZXJhdGlvbiBub3c/
@@ -1153,7 +1154,6 @@
SW52ZXJ0
S2V5d29yZA==
TGluaw==
- VXNlcm5hbWU=
RGVmYXVsdCBNRVRBIGtleXdvcmRz
TWluaW11bSBwYXNzd29yZCBsZW5ndGg=
VXNlciBuYW1lIGxlbmd0aCAobWluIC0gbWF4KQ==
@@ -1473,7 +1473,6 @@
TnVtYmVyIG9mIGRheXMgdG8gZGVueSBtdWx0aXBsZSBDb21tZW50cyBmcm9tIHRoZSBzYW1lIHVzZXI=
QXNzaWduIG1haWxpbmcgbGlzdCBzdWJzY3JpYmVycyB0byBncm91cA==
TnVtYmVyIG9mIGRheXMgdG8gZGVueSBtdWx0aXBsZSB2b3RlcyBmcm9tIHRoZSBzYW1lIHVzZXI=
- VXNlIEVtYWlscyBBcyBMb2dpbg==
VVMvVUs=
RS1tYWlsIGFkZHJlc3M=
VmFsdWU=
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 14726)
+++ install/install_data.sql (working copy)
@@ -99,7 +99,7 @@
# Section "in-portal:configure_users":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration||2=la_opt_UserNotAllowedRegistration||3=la_opt_UserUponApprovalRegistration||4=la_opt_UserEmailActivation', 10.01, 0, 1, NULL);
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, 'RegistrationUsernameRequired', '1', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_RegistrationUsernameRequired', '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', '', '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);
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 14726)
+++ install/upgrades.sql (working copy)
@@ -2220,4 +2220,18 @@
UPDATE BanRules
SET ItemField = 'Username'
-WHERE ItemField = 'Login';
\ No newline at end of file
+WHERE ItemField = 'Login';
+
+DELETE FROM Phrase
+WHERE PhraseKey IN (
+ 'LU_USERNAME', 'LU_EMAIL', 'LU_PASSWORD', 'LA_TEXT_LOGIN', 'LA_PROMPT_PASSWORD',
+ 'LA_USE_EMAILS_AS_LOGIN', 'LU_USER_AND_EMAIL_ALREADY_EXIST', 'LU_ENTERFORGOTEMAIL'
+);
+
+UPDATE ConfigurationValues
+SET VariableName = 'RegistrationUsernameRequired', Prompt = 'la_config_RegistrationUsernameRequired'
+WHERE VariableName = 'Email_As_Login';
+
+UPDATE ConfigurationValues
+SET VariableValue = IF(VariableValue = 1, 0, 1)
+WHERE VariableName = 'RegistrationUsernameRequired';
Index: kernel/managers/cache_manager.php
===================================================================
--- kernel/managers/cache_manager.php (revision 14705)
+++ kernel/managers/cache_manager.php (working copy)
@@ -378,7 +378,7 @@
'KeepSessionOnBrowserClose',
'User_GuestGroup',
'User_LoggedInGroup',
- 'Email_As_Login',
+ 'RegistrationUsernameRequired',
// output related
'UseModRewrite',
Index: units/users/users_event_handler.php
===================================================================
--- units/users/users_event_handler.php (revision 14726)
+++ units/users/users_event_handler.php (working copy)
@@ -470,12 +470,6 @@
$cs_helper->PopulateStates($event, 'State', 'Country');
- if ( $this->Application->ConfigValue('Email_As_Login') ) {
- $error_msgs = $object->GetFieldOption('Email', 'error_msgs');
- $error_msgs['unique'] = '!lu_user_and_email_already_exist!';
- $object->SetFieldOption('Email', 'error_msgs', $error_msgs);
- }
-
$this->setUserGroup($object);
$user_helper =& $this->Application->recallObject('UserHelper');
@@ -1457,7 +1451,7 @@
}
}
- if ( !$this->Application->ConfigValue('Email_As_Login') ) {
+ if ( $this->Application->ConfigValue('RegistrationUsernameRequired') ) {
// Username becomes required only, when it's used in registration process
$form_fields['Username']['required'] = 1;
}
Index: units/users/users_tag_processor.php
===================================================================
--- units/users/users_tag_processor.php (revision 14726)
+++ units/users/users_tag_processor.php (working copy)
@@ -16,7 +16,6 @@
class UsersTagProcessor extends kDBTagProcessor
{
-
function LogoutLink($params)
{
$pass = Array('pass' => 'all,m,u', 'u_event' => 'OnLogout', 'm_cat_id' => 0);
@@ -24,11 +23,6 @@
return $this->Application->HREF($logout_template, '', $pass);
}
- function UseUsernames($params)
- {
- return $this->Application->ConfigValue('Email_As_Login') != 1;
- }
-
function RegistrationEnabled($params)
{
return $this->Application->ConfigValue('User_Allow_New') != 2;