From d7a16929b9fbfdbb52faab82f2560904b6b10c3e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 25 May 2011 14:01:22 -0400 Subject: [PATCH] Set the current user on API calls --- lib/apiauth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/apiauth.php b/lib/apiauth.php index 1e2a6101d6..1061e6b68c 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -204,9 +204,12 @@ class ApiAuthAction extends ApiAction } } $this->auth_user = $user; + // FIXME: setting the value returned by common_current_user() + // There should probably be a better method for this. common_set_user() + // does lots of session stuff. global $_cur; $_cur = $this->auth_user; - Event::handle('EndSetApiUser', array($user)); + Event::handle('EndSetApiUser', array($user)); } $msg = "API OAuth authentication for user '%s' (id: %d) on behalf of " . -- 2.39.5