<?php
class LoginController extends Yaf_Controller_Abstract
{
public function indexAction()
{
// ... verify the credentials against the database
$session = Yaf_Session::getInstance();
$session->start();
$session->set("user_id", $user->getId());
$session->set("login_time", time());
return $this->redirect("/dashboard");
}
}
?>