- function getApp()
- {
- // Look up the full req token
-
- $req_token = $this->store->lookup_token(null,
- 'request',
- $this->oauth_token);
-
- if (empty($req_token)) {
-
- common_debug("Couldn't find request token!");
-
- $this->clientError(_('Bad request.'));
- return;
- }
-
- // Look up the app
-
- $app = new Oauth_application();
- $app->consumer_key = $req_token->consumer_key;
- $result = $app->find(true);
-
- if (!empty($result)) {
- $this->app = $app;
- return true;
-
- } else {
- common_debug("couldn't find the app!");
- return false;
- }
- }
-