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