3 * @file src/Module/Logout.php
6 namespace Friendica\Module;
8 use Friendica\BaseModule;
9 use Friendica\Core\Authentication;
10 use Friendica\Core\Hook;
11 use Friendica\Core\L10n;
12 use Friendica\Core\System;
13 use Friendica\Model\Profile;
18 * @author Hypolite Petovan <hypolite@mrpetovan.com>
20 class Logout extends BaseModule
23 * @brief Process logout requests
25 public static function init()
29 $visitor_home = Profile::getMyURL();
32 Hook::callAll("logging_out");
33 Authentication::deleteSession();
36 System::externalRedirect($visitor_home);
38 info(L10n::t('Logged out.'));
39 self::getApp()->internalRedirect();