{"record":{"id":"112372118382cd54","repo":"octobercms/october","slug":"there-is-no-an-authenticated-user-to-load-or-save","errorCode":null,"errorMessage":"There is no an authenticated user to load or save preferences for.","messagePattern":"There is no an authenticated user to load or save preferences for\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/models/UserPreference.php","lineNumber":41,"sourceCode":"    public $timestamps = false;\n\n    /**\n     * @var array cache\n     */\n    protected static $cache = [];\n\n    /**\n     * resolveUser checks for a supplied user or uses the default logged in. You should\n     * override this method\n     *\n     * @param mixed $user An optional back-end user object.\n     * @return User object\n     */\n    public function resolveUser($user)\n    {\n        $user = BackendAuth::getUser();\n        if (!$user) {\n            throw new SystemException(trans('backend::lang.user.preferences.not_authenticated'));\n        }\n\n        return $user;\n    }\n}\n","sourceCodeStart":23,"sourceCodeEnd":47,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/models/UserPreference.php#L23-L47","documentation":"Error \"There is no an authenticated user to load or save preferences for.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/backend/models/UserPreference.php:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}