function before_action() { parent::before_action(); $this->current_user = User::find($_SESSION['user_id']); if (!$this->current_user) { $this->redirect('/'); } }
function before_action() { parent::before_action(); $this->layout('default'); }