mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31: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
|
|
@ -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