use Friendica\Core\Config;
use Friendica\Database\DBA;
-use Friendica\Database\DBM;
use OAuthConsumer;
use OAuthDataStore;
use OAuthToken;
logger(__function__ . ":" . $consumer_key);
$s = DBA::select('clients', ['client_id', 'pw', 'redirect_uri'], ['client_id' => $consumer_key]);
- $r = DBA::inArray($s);
+ $r = DBA::toArray($s);
- if (DBM::is_result($r)) {
+ if (DBA::isResult($r)) {
return new OAuthConsumer($r[0]['client_id'], $r[0]['pw'], $r[0]['redirect_uri']);
}
logger(__function__ . ":" . $consumer . ", " . $token_type . ", " . $token);
$s = DBA::select('tokens', ['id', 'secret', 'scope', 'expires', 'uid'], ['client_id' => $consumer->key, 'scope' => $token_type, 'id' => $token]);
- $r = DBA::inArray($s);
+ $r = DBA::toArray($s);
- if (DBM::is_result($r)) {
+ if (DBA::isResult($r)) {
$ot = new OAuthToken($r[0]['id'], $r[0]['secret']);
$ot->scope = $r[0]['scope'];
$ot->expires = $r[0]['expires'];
public function lookup_nonce($consumer, $token, $nonce, $timestamp)
{
$token = DBA::selectFirst('tokens', ['id', 'secret'], ['client_id' => $consumer->key, 'id' => $nonce, 'expires' => $timestamp]);
- if (DBM::is_result($token)) {
+ if (DBA::isResult($token)) {
return new OAuthToken($token['id'], $token['secret']);
}