summaryrefslogtreecommitdiff
path: root/classes/Oauth_application.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-03 12:32:48 -0500
committerEvan Prodromou <evan@status.net>2010-02-03 12:32:48 -0500
commit900cb8dd91b954d4e720b0c8afb2884419f43cd7 (patch)
treec2308c56f097d735273e965374240dfc20ded284 /classes/Oauth_application.php
parentaa4848d62d9bcc8166f18f4a18e5a3d2a6a51537 (diff)
parentefa930ab000e1e022f0754d9f421e8859024142c (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
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();
+ }
+
}