wix-router.WixRouterUser

wix-router.WixRouterUser

An object that contains information about the current site visitor who is logged in.

Properties

id String The user's ID.
role String The user's role.

Contents

id Gets the user's ID.
role Gets the user's role.
id

id

Gets the user's ID.

Syntax

get id(): String

Description

The unique ID of the user.

Type

String

role

role

Gets the user's role.

Syntax

get role(): String

Description

Gets one of the following roles:

  • "Admin" — The owner of the site.
  • "Member" — A user who is logged in.
  • "Visitor" — A user who is not logged in.

Type

String