OKAPI Project update (r938)

This commit is contained in:
Wojciech Rygielski
2014-01-12 19:01:01 +01:00
committed by Nils Bohrs
parent 979121c470
commit e657c3c409
19 changed files with 279 additions and 50 deletions

View File

@@ -9,14 +9,14 @@ class OkapiDataStore extends OAuthDataStore
public function lookup_consumer($consumer_key)
{
$row = Db::select_row("
select `key`, secret, name, url, email
select `key`, secret, name, url, email, admin
from okapi_consumers
where `key` = '".mysql_real_escape_string($consumer_key)."'
");
if (!$row)
return null;
return new OkapiConsumer($row['key'], $row['secret'], $row['name'],
$row['url'], $row['email']);
$row['url'], $row['email'], $row['admin'] ? true : false);
}
public function lookup_token($consumer, $token_type, $token)