Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
559B

  1. <?php
  2. /**
  3. * @file src/Module/Logout.php
  4. */
  5. namespace Friendica\Module;
  6. use Friendica\BaseModule;
  7. use Friendica\Core\Addon;
  8. use Friendica\Core\Authentication;
  9. use Friendica\Core\L10n;
  10. use Friendica\Core\System;
  11. /**
  12. * Logout module
  13. *
  14. * @author Hypolite Petovan <hypolite@mrpetovan.com>
  15. */
  16. class Logout extends BaseModule
  17. {
  18. /**
  19. * @brief Process logout requests
  20. */
  21. public static function init()
  22. {
  23. Addon::callHooks("logging_out");
  24. Authentication::deleteSession();
  25. info(L10n::t('Logged out.') . EOL);
  26. self::getApp()->internalRedirect();
  27. }
  28. }