login/logout redirect
I can't believe I didn't figure this one out sooner! Inside view/loginview.php, inside each of the functions, add in this line before the $mysidia variable is set:
PHP:
header( "Location: /" );
(The online users count won't update until you visit another page, btw?)
In case anyone needs my final version of the file (you shouldn't), here it is, for reference:
PHP:
<?php
class LoginView extends View{
public function index(){
header( "Location: /" );
$mysidia = Registry::get("mysidia");
$document = $this->document;
if($mysidia->input->post("submit")){
$document->setTitle($this->lang->success_title);
$document->addLangvar("Welcome back {$mysidia->input->post("username")}. {$this->lang->success}");
return;
}
$document->setTitle($this->lang->title);
$document->addLangvar($this->lang->login);
# $loginForm = $mysidia->frame->getSidebar()->getLoginBar();
# $document->add($loginForm);
}
public function logout(){
header( "Location: /" );
$mysidia = Registry::get("mysidia");
$document = $this->document;
$document->setTitle($this->lang->logout_title);
$document->addLangvar($this->lang->logout);
}
}
?>