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;
16 use Friendica\Model\Profile;
21 * @author Hypolite Petovan <hypolite@mrpetovan.com>
23 class Logout extends BaseModule
26 * @brief Process logout requests
28 public static function init(array $parameters = [])
32 $visitor_home = Profile::getMyURL();
33 Cache::delete('zrlInit:' . $visitor_home);
36 Hook::callAll("logging_out");
40 System::externalRedirect($visitor_home);
42 info(L10n::t('Logged out.'));
43 DI::app()->internalRedirect();