3 * @file src/Module/Logout.php
6 namespace Friendica\Module\Security;
8 use Friendica\BaseModule;
9 use Friendica\App\Authentication;
10 use Friendica\Core\Cache;
11 use Friendica\Core\Hook;
12 use Friendica\Core\L10n;
13 use Friendica\Core\Session;
14 use Friendica\Core\System;
15 use Friendica\Model\Profile;
20 * @author Hypolite Petovan <hypolite@mrpetovan.com>
22 class Logout extends BaseModule
25 * @brief Process logout requests
27 public static function init(array $parameters = [])
31 $visitor_home = Profile::getMyURL();
32 Cache::delete('zrlInit:' . $visitor_home);
35 Hook::callAll("logging_out");
39 System::externalRedirect($visitor_home);
41 info(L10n::t('Logged out.'));
42 self::getApp()->internalRedirect();