mirror of
https://github.com/friendica/friendica
synced 2025-04-22 19:50:11 +00:00
Add new Module classes
- Add BaseModule - Add Login module - Add Logout module
This commit is contained in:
parent
190a765731
commit
2243a82bb4
3 changed files with 341 additions and 1 deletions
29
src/Module/Logout.php
Normal file
29
src/Module/Logout.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
|
||||
require_once 'boot.php';
|
||||
require_once 'include/pgettext.php';
|
||||
require_once 'include/plugin.php';
|
||||
require_once 'include/security.php';
|
||||
|
||||
/**
|
||||
* Logout module
|
||||
*
|
||||
* @author Hypolite Petovan mrpetovan@gmail.com
|
||||
*/
|
||||
class Logout extends BaseModule
|
||||
{
|
||||
/**
|
||||
* @brief Process logout requests
|
||||
*/
|
||||
public static function init()
|
||||
{
|
||||
call_hooks("logging_out");
|
||||
nuke_session();
|
||||
info(t('Logged out.') . EOL);
|
||||
goaway(self::getApp()->get_baseurl());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue