/** * This must be called after update current user model * * @return void */ public static function updateSession($user) { if (self::$signed) { self::$id = $user->id; self::$name = $user->name; self::$model = $user; Request::setSession('logined_user', $user->fields()); } }