if (Auth.CommunitiesUtil.isGuestUser()) // Redirect to the login page if user is an unauthenticated user return new PageReference(LOGIN_URL); if (Auth.CommunitiesUtil.isInternalUser()) // Redirect to the home page if user is an internal user return new PageReference(HOME_URL);
The following are methods for CommunitiesUtil. All methods are static.
public static Boolean isGuestUser()
Type: Boolean
public static Boolean isInternalUser()
Type: Boolean