mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/passwords] Use passwords.manager service in login_forum_box()
Additionally, unused variables have been removed from the globals and the request class is now used instead of the request_var() function. PHPBB3-11610
This commit is contained in:
parent
0f64843ac8
commit
e674313559
1 changed files with 5 additions and 3 deletions
|
@ -3310,9 +3310,9 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||||
*/
|
*/
|
||||||
function login_forum_box($forum_data)
|
function login_forum_box($forum_data)
|
||||||
{
|
{
|
||||||
global $db, $config, $user, $template, $phpEx;
|
global $db, $phpbb_container, $request, $template, $user;
|
||||||
|
|
||||||
$password = request_var('password', '', true);
|
$password = $request->variable('password', '', true);
|
||||||
|
|
||||||
$sql = 'SELECT forum_id
|
$sql = 'SELECT forum_id
|
||||||
FROM ' . FORUMS_ACCESS_TABLE . '
|
FROM ' . FORUMS_ACCESS_TABLE . '
|
||||||
|
@ -3353,7 +3353,9 @@ function login_forum_box($forum_data)
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (phpbb_check_hash($password, $forum_data['forum_password']))
|
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||||
|
|
||||||
|
if ($passwords_manager->check($password, $forum_data['forum_password']))
|
||||||
{
|
{
|
||||||
$sql_ary = array(
|
$sql_ary = array(
|
||||||
'forum_id' => (int) $forum_data['forum_id'],
|
'forum_id' => (int) $forum_data['forum_id'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue