id


idstringRead-only

Gets the user's ID.

The unique ID of the user.

Note: The APIs in WixRouterUser are only partially functional when previewing your site. View a published version of your site to see their complete functionality.

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