<?php
/**
 * Created by PhpStorm.
 * User: eater
 * Date: 4/2/16
 * Time: 8:57 PM
 */

namespace Eater\Glim\Handler;


class Logout extends Main
{
    public function handle()
    {
        /* @var \Aura\Session\Session $session */
        $session = $this->get('session');
        $segment = $session->getSegment('main');

        $segment->set('userId', null);

        return $this->redirect('/login');
    }
}