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.
 
 
 
 
 

23 lines
452 B

<?php
namespace App\Controllers;
use Movim\Controller\Base;
use Movim\Cookie;
class DisconnectController extends Base
{
public function dispatch()
{
// Just in case
if ($this->user) {
$this->user->encryptedPasswords()->delete();
requestAPI('disconnect', post: ['sid' => $this->user->session->id]);
}
// Fresh cookie
Cookie::renew();
$this->redirect('login');
}
}