Fix #2044 set identifier to 'user_id' unless email is the only option

이메일 이외의 로그인 방법이 하나라도 선택되어 있다면
identifier 설정은 user_id로 고정
This commit is contained in:
Kijin Sung 2023-02-26 21:45:51 +09:00
parent cc40b156da
commit 512ca07680
3 changed files with 6 additions and 5 deletions

View file

@ -105,8 +105,8 @@ class MemberModel extends Member
}
// Set login config
$config->identifier = $config->identifier ?? 'user_id';
$config->identifiers = $config->identifiers ?? array('user_id', 'email_address');
$config->identifier = (count($config->identifiers) == 1 && $config->identifiers[0] == '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;