]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Replace deprecated Addon::callHooks with Hook::callAll
[friendica.git] / include / api.php
index 6993cb6889f8a46a10ee1b83a1f65816dfb477b0..f28f18253207cb6391c864143b0d63398f1b809c 100644 (file)
@@ -11,9 +11,9 @@ use Friendica\Content\ContactSelector;
 use Friendica\Content\Feature;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Addon;
 use Friendica\Core\Authentication;
 use Friendica\Core\Config;
+use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\NotificationsManager;
@@ -174,7 +174,7 @@ function api_login(App $a)
                list($consumer, $token) = $oauth1->verify_request($request);
                if (!is_null($token)) {
                        $oauth1->loginUser($token->uid);
-                       Addon::callHooks('logged_in', $a->user);
+                       Hook::callAll('logged_in', $a->user);
                        return;
                }
                echo __FILE__.__LINE__.__FUNCTION__ . "<pre>";
@@ -224,7 +224,7 @@ function api_login(App $a)
        * Addons should never set 'authenticated' except to indicate success - as hooks may be chained
        * and later addons should not interfere with an earlier one that succeeded.
        */
-       Addon::callHooks('authenticate', $addon_auth);
+       Hook::callAll('authenticate', $addon_auth);
 
        if ($addon_auth['authenticated'] && count($addon_auth['user_record'])) {
                $record = $addon_auth['user_record'];
@@ -247,7 +247,7 @@ function api_login(App $a)
 
        $_SESSION["allow_api"] = true;
 
-       Addon::callHooks('logged_in', $a->user);
+       Hook::callAll('logged_in', $a->user);
 }
 
 /**