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

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