diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-08-10 14:57:50 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-08-11 01:16:42 +0200 |
commit | 2cbcf4bcbf5ece84fcfef8848233421f386972f3 (patch) | |
tree | addeea8292be6ea7a27182c1b527352ec827ec01 /phpBB/phpbb/auth | |
parent | 036a61a904ce1a3023bb137fbfaf546b473c528d (diff) | |
download | forums-2cbcf4bcbf5ece84fcfef8848233421f386972f3.tar forums-2cbcf4bcbf5ece84fcfef8848233421f386972f3.tar.gz forums-2cbcf4bcbf5ece84fcfef8848233421f386972f3.tar.bz2 forums-2cbcf4bcbf5ece84fcfef8848233421f386972f3.tar.xz forums-2cbcf4bcbf5ece84fcfef8848233421f386972f3.zip |
[ticket/11854] Fix the factory in \phpbb\auth\provider\db
PHPBB3-11854
Diffstat (limited to 'phpBB/phpbb/auth')
-rw-r--r-- | phpBB/phpbb/auth/provider/db.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/phpbb/auth/provider/db.php b/phpBB/phpbb/auth/provider/db.php index cb7a2f8b1a..722eeffa9a 100644 --- a/phpBB/phpbb/auth/provider/db.php +++ b/phpBB/phpbb/auth/provider/db.php @@ -27,6 +27,13 @@ class db extends \phpbb\auth\provider\base protected $passwords_manager; /** + * DI container + * + * @var \Symfony\Component\DependencyInjection\ContainerInterface + */ + protected $phpbb_container; + + /** * Database Authentication Constructor * * @param \phpbb\db\driver\driver_interface $db @@ -34,10 +41,11 @@ class db extends \phpbb\auth\provider\base * @param \phpbb\passwords\manager $passwords_manager * @param \phpbb\request\request $request * @param \phpbb\user $user + * @param \Symfony\Component\DependencyInjection\ContainerInterface $phpbb_container DI container * @param string $phpbb_root_path * @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->config = $config; @@ -46,6 +54,7 @@ class db extends \phpbb\auth\provider\base $this->user = $user; $this->phpbb_root_path = $phpbb_root_path; $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... 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); $vc_response = $captcha->validate($row); if ($vc_response) |