Allow developers to delete OAuth applications

This commit is contained in:
Zach Copley
2010-02-02 06:26:03 +00:00
parent df2a081265
commit f0875ceea1
5 changed files with 244 additions and 2 deletions

View File

@@ -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();
}
}