Search.../

user

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

Description

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

Type:

WixRouterUserRead Only

Was this helpful?

Get the user from the request

Copy Code
1export function myRouter_SiteMap(sitemapRequest) {
2
3 let user = sitemapRequest.user;
4 /*
5 * {
6 * "id": "f6q0fb32-b06r-469f-ag4d-9df89afkj5d9",
7 * "role": "Admin"
8 * }
9 */
10
11}