<?php
 namespace Module\AdminLoginDefault;
 use TCMS\Controller;
 use TCMS\TException;
 class LogoutController extends Controller {
 public function __construct() {
 }
 public function logout() {
 $authExt = load_auth();
 if(!$authExt) {
 return redirect(url());
 }
 $authExt->logout();
 if (\Request::has('redirect_url')) return redirect($authExt->loginUrl . '?redirect_url=' . \Request::get('redirect_url'));
 return redirect($authExt->loginUrl);
 }
 }
 