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:
Kijin Sung 2023-06-29 01:45:38 +09:00
parent 05bab8e7f8
commit fa6607ab86
2 changed files with 16 additions and 2 deletions

View file

@ -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)
{