[feature/oauth] Fix error in token_storage::set_user_id()

PHPBB3-11673
This commit is contained in:
Joseph Warner 2013-07-24 15:06:38 -04:00
parent 27ea03d3e0
commit 15a2ad3149

View file

@ -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);
} }
} }