$user = UserService::getCurrentUser();if (isset($user) && UserService::isCurrentUserAdmin()) { return 'Welcome administrator.';}return 'You are not an administrator.';
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-06-16 (世界標準時間)。"],[[["Applications can check if the currently signed-in user has administrator privileges."],["Administrators have access to the application's Administration Console for management tasks."],["The `UserService::isCurrentUserAdmin()` function determines if the current user is an administrator, returning `True` if they are."],["The `login: admin` configuration element can restrict access to parts of an application, limiting it to administrators."]]],[]]