mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11854] Fix the factory in \phpbb\auth\provider\db
PHPBB3-11854
This commit is contained in:
parent
036a61a904
commit
2cbcf4bcbf
2 changed files with 13 additions and 2 deletions
|
@ -14,6 +14,7 @@ services:
|
||||||
- @passwords.manager
|
- @passwords.manager
|
||||||
- @request
|
- @request
|
||||||
- @user
|
- @user
|
||||||
|
- @service_container
|
||||||
- %core.root_path%
|
- %core.root_path%
|
||||||
- %core.php_ext%
|
- %core.php_ext%
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -26,6 +26,13 @@ class db extends \phpbb\auth\provider\base
|
||||||
*/
|
*/
|
||||||
protected $passwords_manager;
|
protected $passwords_manager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DI container
|
||||||
|
*
|
||||||
|
* @var \Symfony\Component\DependencyInjection\ContainerInterface
|
||||||
|
*/
|
||||||
|
protected $phpbb_container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database Authentication Constructor
|
* Database Authentication Constructor
|
||||||
*
|
*
|
||||||
|
@ -34,10 +41,11 @@ class db extends \phpbb\auth\provider\base
|
||||||
* @param \phpbb\passwords\manager $passwords_manager
|
* @param \phpbb\passwords\manager $passwords_manager
|
||||||
* @param \phpbb\request\request $request
|
* @param \phpbb\request\request $request
|
||||||
* @param \phpbb\user $user
|
* @param \phpbb\user $user
|
||||||
|
* @param \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container DI container
|
||||||
* @param string $phpbb_root_path
|
* @param string $phpbb_root_path
|
||||||
* @param string $php_ext
|
* @param string $php_ext
|
||||||
*/
|
*/
|
||||||
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
|
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container, $phpbb_root_path, $php_ext)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
@ -46,6 +54,7 @@ class db extends \phpbb\auth\provider\base
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->phpbb_root_path = $phpbb_root_path;
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
$this->php_ext = $php_ext;
|
$this->php_ext = $php_ext;
|
||||||
|
$this->phpbb_container = $phpbb_container;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,7 +155,8 @@ class db extends \phpbb\auth\provider\base
|
||||||
// Every auth module is able to define what to do by itself...
|
// Every auth module is able to define what to do by itself...
|
||||||
if ($show_captcha)
|
if ($show_captcha)
|
||||||
{
|
{
|
||||||
$captcha = $this->captchas_manager->get_instance($this->config['captcha_plugin']);
|
$captcha_factory = $this->phpbb_container->get('captcha.factory');
|
||||||
|
$captcha = $captcha_factory->get_instance($this->config['captcha_plugin']);
|
||||||
$captcha->init(CONFIRM_LOGIN);
|
$captcha->init(CONFIRM_LOGIN);
|
||||||
$vc_response = $captcha->validate($row);
|
$vc_response = $captcha->validate($row);
|
||||||
if ($vc_response)
|
if ($vc_response)
|
||||||
|
|
Loading…
Add table
Reference in a new issue