mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge pull request #6169 from 3D-I/ticket/16735
[ticket/16735] Fix access array offset on value of type bool on login
This commit is contained in:
commit
9d2fae3285
1 changed files with 6 additions and 2 deletions
|
@ -153,8 +153,12 @@ class db extends base
|
|||
}
|
||||
|
||||
$login_error_attempts = 'LOGIN_ERROR_ATTEMPTS';
|
||||
$show_captcha = ($this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']) ||
|
||||
($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']);
|
||||
|
||||
$user_login_attempts = (is_array($row) && $this->config['max_login_attempts'] && $row['user_login_attempts'] >= $this->config['max_login_attempts']);
|
||||
$ip_login_attempts = ($this->config['ip_login_limit_max'] && $attempts >= $this->config['ip_login_limit_max']);
|
||||
|
||||
$show_captcha = $user_login_attempts || $ip_login_attempts;
|
||||
|
||||
if ($show_captcha)
|
||||
{
|
||||
$captcha = $this->captcha_factory->get_instance($this->config['captcha_plugin']);
|
||||
|
|
Loading…
Add table
Reference in a new issue