CommunitiesUtil Class
Contains methods for getting information about an Experience Cloud user.
The following example directs a guest (unauthenticated) user to one page, and authenticated users of the Experience Cloud site’s parent organization to another page.
The following are methods for CommunitiesUtil. All methods are static.
-
Returns the page to display after the current Experience Cloud user logs out.
-
Returns the current user’s Experience Cloud display name.
-
Indicates whether the current user isn’t logged in to the Experience Cloud site. Redirect the user to log in, if necessary.
-
Indicates whether the current user is logged in as a member of the parent Salesforce organization, such as an employee.
Returns the page to display after the current Experience Cloud user logs out.
public static String getLogoutUrl()
Type: String
Returns the current user’s Experience Cloud display name.
public static String getUserDisplayName()
Type: String
Indicates whether the current user isn’t logged in to the Experience Cloud site. Redirect the user to log in, if necessary.
public static Boolean isGuestUser()
Type: Boolean
Indicates whether the current user is logged in as a member of the parent Salesforce organization, such as an employee.
public static Boolean isInternalUser()
Type: Boolean