X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fapiauth.php;h=0d1613d381ed17de89be5410b47e1b7df2f04637;hb=69ac99ff949ab0118ff25a62471980ad0ec7a52b;hp=b8189f15dd9e276ea8f63ae9d85340fdfdad1770;hpb=cae06a49ea60cacb926f27b18b88a8a7f801f011;p=quix0rs-gnu-social.git diff --git a/lib/apiauth.php b/lib/apiauth.php index b8189f15dd..0d1613d381 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -87,7 +87,7 @@ class ApiAuthAction extends ApiAction } /** - * Check for a user specified via HTTP basic auth. If there is not + * Check for a user specified via HTTP basic auth. If there isn't * one, try to get one by outputting the basic auth header. * * @return boolean true or false @@ -110,7 +110,11 @@ class ApiAuthAction extends ApiAction } else { $nickname = $this->auth_user; $password = $this->auth_pw; - $this->auth_user = common_check_user($nickname, $password); + $user = common_check_user($nickname, $password); + if (Event::handle('StartSetApiUser', array(&$user))) { + $this->auth_user = $user; + Event::handle('EndSetApiUser', array($user)); + } if (empty($this->auth_user)) {