Fix no autologin after signup if phone number is the only available identifier #2485

This commit is contained in:
Kijin Sung 2025-02-14 21:14:58 +09:00
parent b5a16dad5e
commit a5b9e11831

View file

@ -873,12 +873,24 @@ class MemberController extends Member
$this->putSignature($args->member_srl, $signature);
// Log-in
if($config->enable_confirm != 'Y')
if ($config->enable_confirm != 'Y')
{
$output = $this->doLogin($args->{$config->identifier});
if(!$output->toBool()) {
if($output->error == -9)
if (isset($config->identifiers) && is_array($config->identifiers))
{
$identifier = array_first($config->identifiers);
}
else
{
$identifier = $config->identifier ?? 'user_id';
}
$output = $this->doLogin($args->{$identifier});
if (!$output->toBool())
{
if ($output->error == -9)
{
$output->error = -11;
}
return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), $output);
}
}