mirror of
https://github.com/phpbb/phpbb.git
synced 2025-10-06 04:31:38 +02:00
[ticket/17543] Use class method to call db object instance where possible
PHPBB-17543
This commit is contained in:
@@ -241,12 +241,10 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca
|
||||
$this->assertNotEmpty($this->user_data['user_actkey']);
|
||||
|
||||
// Change reason for inactivity
|
||||
$db = $this->get_db();
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_inactive_reason = ' . INACTIVE_REMIND . '
|
||||
WHERE user_id = ' . (int) $this->user_data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
$this->add_lang('ucp');
|
||||
|
||||
@@ -262,12 +260,11 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca
|
||||
|
||||
protected function get_user_data($username)
|
||||
{
|
||||
$db = $this->get_db();
|
||||
$sql = 'SELECT user_id, username, user_type, user_email, user_newpasswd, user_lang, user_actkey, user_inactive_reason, reset_token, reset_token_expiration
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username = '" . $db->sql_escape($username) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$this->user_data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
WHERE username = '" . $this->db->sql_escape($username) . "'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
$this->user_data = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user