User Selectors
- getUserData
- isUserLoggedIn
- getUserDisplayName
- getUserFirstName
- getUserEmail
- isUserLoginDisabled
- getRegisterUrl
getUserData
Section titled “getUserData”Retrieves the user data object from the store.
import { getUserData } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(Object|null): The user data. If no user data is found, it returns null.
The user data will match the getUser pipeline response.
isUserLoggedIn
Section titled “isUserLoggedIn”Retrieves whether the user is logged in from the user data in the store.
import { isUserLoggedIn } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(boolean): Whether the user is logged in.
getUserDisplayName
Section titled “getUserDisplayName”Retrieves the display name ({firstName} {lastName}) for a user from the user data in the store.
import { getUserDisplayName } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The display name for a user. If no data is found, it returns null.
getUserFirstName
Section titled “getUserFirstName”Retrieves the first name for a user from the user data in the store.
import { getUserFirstName } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The first name for a user. If no data is found, it returns null.
getUserEmail
Section titled “getUserEmail”Retrieves the email for the currently logged in user.
import { getUserEmail } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The email for the user. If no data is found, it returns null.
isUserLoginDisabled
Section titled “isUserLoginDisabled”Retrieves whether the user login is disabled from the user data in the store.
import { isUserLoginDisabled } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(boolean): Whether the user login is disabled.
getRegisterUrl
Section titled “getRegisterUrl”Retrieves the registration URL from the data in the store.
import { getRegisterUrl } from '@shopgate/engage/user';Parameters
Section titled “Parameters”state(Object) required: The application state.
Returns
Section titled “Returns”(string|null): The registration URL. If no URL is found, it returns null.

