user


userWixRouterUserRead-only

Returns the details of the current site user who is logged in.

Returns an object with the id and role of the logged in user who made the request.

Get the user from the request
JavaScript
export function myRouter_SiteMap(sitemapRequest) { let user = sitemapRequest.user; /* * { * "id": "f6q0fb32-b06r-469f-ag4d-9df89afkj5d9", * "role": "Admin" * } */ }
Did this help?