summaryrefslogtreecommitdiff
path: root/classes/Oauth_application.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-02 06:26:03 +0000
committerZach Copley <zach@status.net>2010-02-05 03:18:43 +0000
commite495ac356c10a6abc0e10c81892830b5e198ef60 (patch)
tree1a0b321221a7ddaf38132d057bb1f02b8f39e61e /classes/Oauth_application.php
parentdc183f23cf3bd8e0fbd604ad2af4b12f77837bf2 (diff)
Allow developers to delete OAuth applications
Diffstat (limited to 'classes/Oauth_application.php')
-rw-r--r--classes/Oauth_application.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/classes/Oauth_application.php b/classes/Oauth_application.php
index a6b539087..748b64220 100644
--- a/classes/Oauth_application.php
+++ b/classes/Oauth_application.php
@@ -137,4 +137,21 @@ class Oauth_application extends Memcached_DataObject
}
}
+ function delete()
+ {
+ $this->_deleteAppUsers();
+
+ $consumer = $this->getConsumer();
+ $consumer->delete();
+
+ parent::delete();
+ }
+
+ function _deleteAppUsers()
+ {
+ $oauser = new Oauth_application_user();
+ $oauser->application_id = $this->id;
+ $oauser->delete();
+ }
+
}