{"templateId":"markdown","versions":[{"version":"9.0","label":"9.0","link":"/classes/whmcs/authentication/currentuser","default":true,"active":true,"folderId":"9d7dc099"},{"version":"8.13","label":"8.13","link":"/classes/8.13/whmcs/authentication/currentuser","default":false,"active":false,"folderId":"9d7dc099"}],"sharedDataIds":{"sidebar":"sidebar-classes/@8.13/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"WHMCS\\Authentication\\CurrentUser","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"whmcsauthenticationcurrentuser","__idx":0},"children":["WHMCS\\Authentication\\CurrentUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Class"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Utility class for assessing the authentication state or identity of the"," ","current actor"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods","__idx":1},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isauthenticateduser","__idx":2},"children":["isAuthenticatedUser"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isAuthenticatedUser(): bool\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Whether the current actor is authenticated as a User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["User\\|null"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"isauthenticatedadmin","__idx":3},"children":["isAuthenticatedAdmin"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isAuthenticatedAdmin(): bool\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Whether the current actor is authenticated as an Admin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Admin\\|null"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ismasqueradingadmin","__idx":4},"children":["isMasqueradingAdmin"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function isMasqueradingAdmin(): bool\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Whether the current actor is authenticated as an Admin but is also"," ","acting on behalf of the client, having performed a \"Login as Owner\"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"user","__idx":5},"children":["user"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function user(): ?User\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get the currently authenticated user."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["User\\|null"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"admin","__idx":6},"children":["admin"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function admin(): ?Admin\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get the currently authenticated admin."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Admin\\|null"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"client","__idx":7},"children":["client"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function client(): ?Client\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get the currently active client for management."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Returns"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client\\|null"]}]}]},"headings":[{"value":"WHMCS\\Authentication\\CurrentUser","id":"whmcsauthenticationcurrentuser","depth":1},{"value":"Methods","id":"methods","depth":2},{"value":"isAuthenticatedUser","id":"isauthenticateduser","depth":3},{"value":"isAuthenticatedAdmin","id":"isauthenticatedadmin","depth":3},{"value":"isMasqueradingAdmin","id":"ismasqueradingadmin","depth":3},{"value":"user","id":"user","depth":3},{"value":"admin","id":"admin","depth":3},{"value":"client","id":"client","depth":3}],"frontmatter":{"title":"WHMCS\\Authentication\\CurrentUser","seo":{"title":"WHMCS\\Authentication\\CurrentUser"}},"lastModified":"2026-08-05T14:37:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/classes/whmcs/authentication/currentuser","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}