Skip to content

User Selectors

Retrieves the user data object from the store.

import { getUserData } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(Object|null): The user data. If no user data is found, it returns null.

The user data will match the getUser pipeline response.


Retrieves whether the user is logged in from the user data in the store.

import { isUserLoggedIn } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(boolean): Whether the user is logged in.


Retrieves the display name ({firstName} {lastName}) for a user from the user data in the store.

import { getUserDisplayName } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(string|null): The display name for a user. If no data is found, it returns null.


Retrieves the first name for a user from the user data in the store.

import { getUserFirstName } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(string|null): The first name for a user. If no data is found, it returns null.


Retrieves the email for the currently logged in user.

import { getUserEmail } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(string|null): The email for the user. If no data is found, it returns null.


Retrieves whether the user login is disabled from the user data in the store.

import { isUserLoginDisabled } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(boolean): Whether the user login is disabled.


Retrieves the registration URL from the data in the store.

import { getRegisterUrl } from '@shopgate/engage/user';
  • state (Object) required: The application state.

(string|null): The registration URL. If no URL is found, it returns null.