mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:11:47 +02:00
[feature/oauth] Fixes for problems found by tests
PHPBB3-11673
This commit is contained in:
@@ -87,7 +87,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'user_id' => $this->user->data['user_id'],
|
'user_id' => $this->user->data['user_id'],
|
||||||
'provider' => $this->service_name,
|
'provider' => $this->service_name,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -130,9 +130,9 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
|||||||
$this->cachedToken = $token;
|
$this->cachedToken = $token;
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'user_id' => $this->user->data['user_id'],
|
'user_id' => $this->user->data['user_id'],
|
||||||
'provider' => $this->service_name,
|
'provider' => $this->service_name,
|
||||||
'oauth_token' => serialize($token),
|
'oauth_token' => serialize($token),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->user->data['user_id'] == ANONYMOUS)
|
if ($this->user->data['user_id'] == ANONYMOUS)
|
||||||
@@ -155,7 +155,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'user_id' => $this->user->data['user_id'],
|
'user_id' => $this->user->data['user_id'],
|
||||||
'provider' => $this->service_name,
|
'provider' => $this->service_name,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ class phpbb_auth_provider_oauth_token_storage implements TokenStorageInterface
|
|||||||
|
|
||||||
$sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
|
$sql = 'DELETE FROM ' . $this->auth_provider_oauth_table . '
|
||||||
WHERE user_id = ' . $this->user->data['user_id'] . '
|
WHERE user_id = ' . $this->user->data['user_id'] . '
|
||||||
AND provider = ' . $this->db->sql_escape($this->oauth_provider);
|
AND provider = \'' . $this->db->sql_escape($this->oauth_provider) . '\'';
|
||||||
|
|
||||||
if ($this->user->data['user_id'] == ANONYMOUS)
|
if ($this->user->data['user_id'] == ANONYMOUS)
|
||||||
{
|
{
|
||||||
|
@@ -151,4 +151,4 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
|
|||||||
|
|
||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user