3 * @file src/Module/Logout.php
6 namespace Friendica\Module;
8 use Friendica\BaseModule;
9 use Friendica\Core\Authentication;
10 use Friendica\Core\Cache;
11 use Friendica\Core\Hook;
12 use Friendica\Core\L10n;
13 use Friendica\Core\System;
14 use Friendica\Model\Profile;
19 * @author Hypolite Petovan <hypolite@mrpetovan.com>
21 class Logout extends BaseModule
24 * @brief Process logout requests
26 public static function init()
30 $visitor_home = Profile::getMyURL();
31 Cache::delete('zrlInit:' . $visitor_home);
34 Hook::callAll("logging_out");
35 Authentication::deleteSession();
38 System::externalRedirect($visitor_home);
40 info(L10n::t('Logged out.'));
41 self::getApp()->internalRedirect();