mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Set identifier to email_address is email confirmation is required, for compatibility with skins that hide the 'Change email address' button otherwise
This commit is contained in:
parent
05bab8e7f8
commit
fa6607ab86
2 changed files with 16 additions and 2 deletions
|
|
@ -615,8 +615,15 @@ class MemberAdminController extends Member
|
|||
{
|
||||
return new BaseObject(-1, 'msg_need_enabled_identifier');
|
||||
}
|
||||
if (in_array('email_address', $args->identifiers) && $config->enable_confirm === 'Y')
|
||||
{
|
||||
$args->identifier = 'email_address';
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->identifier = array_first($args->identifiers) === 'email_address' ? 'email_address' : 'user_id';
|
||||
}
|
||||
$args->signupForm = $config->signupForm;
|
||||
$args->identifier = (count($args->identifiers) == 1 && $args->identifiers[0] == 'email_address') ? 'email_address' : 'user_id';
|
||||
|
||||
if(!$args->change_password_date)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,14 @@ class MemberModel extends Member
|
|||
|
||||
// Set login config
|
||||
$config->identifiers = $config->identifiers ?? array('user_id', 'email_address');
|
||||
$config->identifier = (count($config->identifiers) == 1 && $config->identifiers[0] == 'email_address') ? 'email_address' : 'user_id';
|
||||
if (in_array('email_address', $config->identifiers) && $config->enable_confirm === 'Y')
|
||||
{
|
||||
$config->identifier = 'email_address';
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->identifier = array_first($config->identifiers) === 'email_address' ? 'email_address' : 'user_id';
|
||||
}
|
||||
$config->change_password_date = $config->change_password_date ?? 0;
|
||||
$config->enable_login_fail_report = $config->enable_login_fail_report ?? 'Y';
|
||||
$config->max_error_count = $config->max_error_count ?? 10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue