summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-10-19 20:54:53 -0700
committerZach Copley <zach@status.net>2010-10-19 20:54:53 -0700
commite8b6d7c946da5fb2ce5397bccfd332de8ca1f9dd (patch)
tree3deb74da4e590c4f5756caed1fa1299a2b1bd2f0 /classes/Profile.php
parentd48f4a81d6af7a9a326ffc2e87d7de568ab48fbe (diff)
Add support for an anonymous OAuth consumer. Note: this requires a
small DB tweak. Oauth_application_user needs to have the primary compound key: (profile_id, application_id, token). http://status.net/open-source/issues/2761 This should also make it possible to have multiple access tokens per application. http://status.net/open-source/issues/2788
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index 12ce5d9b6..a32051d07 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -401,10 +401,10 @@ class Profile extends Memcached_DataObject
return $profile;
}
- function getApplications($offset = 0, $limit = null)
+ function getConnectedApps($offset = 0, $limit = null)
{
$qry =
- 'SELECT a.* ' .
+ 'SELECT u.* ' .
'FROM oauth_application_user u, oauth_application a ' .
'WHERE u.profile_id = %d ' .
'AND a.id = u.application_id ' .
@@ -419,11 +419,11 @@ class Profile extends Memcached_DataObject
}
}
- $application = new Oauth_application();
+ $apps = new Oauth_application_user();
- $cnt = $application->query(sprintf($qry, $this->id));
+ $cnt = $apps->query(sprintf($qry, $this->id));
- return $application;
+ return $apps;
}
function subscriptionCount()