]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/apiauth.php
Merge branch 'admin-sections/4' into 0.9.x
[quix0rs-gnu-social.git] / lib / apiauth.php
index 4e5e0ccd997b4a5abcdf658cda1281078ad0c345..0d1613d381ed17de89be5410b47e1b7df2f04637 100644 (file)
  *
  * @category  API
  * @package   StatusNet
- * @author    Zach Copley <zach@status.net>
+ * @author    Adrian Lang <mail@adrianlang.de>
+ * @author    Brenda Wallace <shiny@cpan.org>
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Dan Moore <dan@moore.cx>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    mEDI <medi@milaro.net>
+ * @author    Sarven Capadisli <csarven@status.net>
+ * @author    Zach Copley <zach@status.net> 
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
@@ -103,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)) {