3 * @file src/Module/Logout.php
6 namespace Friendica\Module\Security;
8 use Friendica\BaseModule;
9 use Friendica\Core\Hook;
10 use Friendica\Core\System;
12 use Friendica\Model\Profile;
17 * @author Hypolite Petovan <hypolite@mrpetovan.com>
19 class Logout extends BaseModule
22 * Process logout requests
24 public static function init(array $parameters = [])
28 $visitor_home = Profile::getMyURL();
29 DI::cache()->delete('zrlInit:' . $visitor_home);
32 Hook::callAll("logging_out");
33 DI::cookie()->clear();
34 DI::session()->clear();
37 System::externalRedirect($visitor_home);
39 info(DI::l10n()->t('Logged out.'));
40 DI::baseUrl()->redirect();