mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/oauth] Fix error in token_storage::set_user_id()
PHPBB3-11673
This commit is contained in:
parent
27ea03d3e0
commit
15a2ad3149
1 changed files with 3 additions and 3 deletions
|
@ -191,7 +191,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
||||||
|
|
||||||
if ($this->user->data['user_id'] == ANONYMOUS)
|
if ($this->user->data['user_id'] == ANONYMOUS)
|
||||||
{
|
{
|
||||||
$sql .= ' AND session_id = ' . $this->user->data['session_id'];
|
$sql .= ' AND session_id = \'' . $this->user->data['session_id'] . '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
|
@ -210,11 +210,11 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'UPDATE ' . $this->auth_provider_oauth_table . '
|
$sql = 'UPDATE ' . $this->auth_provider_oauth_table . '
|
||||||
SET ' . $db->sql_build_array('UPDATE', array(
|
SET ' . $this->db->sql_build_array('UPDATE', array(
|
||||||
'user_id' => (int) $user_id
|
'user_id' => (int) $user_id
|
||||||
)) . '
|
)) . '
|
||||||
WHERE user_id = ' . $this->user->data['user_id'] . '
|
WHERE user_id = ' . $this->user->data['user_id'] . '
|
||||||
AND session_id = ' . $this->user->data['session_id'];
|
AND session_id = \'' . $this->user->data['session_id'] . '\'';
|
||||||
$this->db->sql_query($sql);
|
$this->db->sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue