diff options
author | Zach Copley <zach@status.net> | 2010-01-20 18:01:07 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-24 16:46:37 -0800 |
commit | 8b24b5ac7bea2098d3c85e342526c2102e2a6fb9 (patch) | |
tree | 197776f8578d86e07c5aada8574006f58e31d1f9 /lib | |
parent | 6a4c88afe723b246cf3a2158ac2c1ad4161bdd43 (diff) |
Add Start/EndSetApiUser events when setting API user via OAuth
Diffstat (limited to 'lib')
-rw-r--r-- | lib/apiauth.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php index 8374c24a7..f513ed2c9 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -149,7 +149,10 @@ class ApiAuthAction extends ApiAction $this->access = ($appUser->access_type & Oauth_application::$writeAccess) ? self::READ_WRITE : self::READ_ONLY; - $this->auth_user = User::staticGet('id', $appUser->profile_id); + if (Event::handle('StartSetApiUser', array(&$user))) { + $this->auth_user = User::staticGet('id', $appUser->profile_id); + Event::handle('EndSetApiUser', array($user)); + } $msg = "API OAuth authentication for user '%s' (id: %d) on behalf of " . "application '%s' (id: %d)."; |