public deleteStateForContext ( $clientConfigId, fkooman\OAuth\Client\Context $context ) | ||
$context | fkooman\OAuth\Client\Context |
public function deleteStateForContext($clientConfigId, fkooman\OAuth\Client\Context $context)
{
$collection = $this->mongo->selectCollection($this->db, 'state');
$result = $collection->remove(array('client_config_id' => $clientConfigId, 'user_id' => $context->getUserId()));
return is_array($result) && 1 == $result['ok'] && $result['n'] > 0 || $result;
}