Social Login: User Role Redirection Settings

Overview

This document provides detailed instructions on the newly implemented shortcode option for the Ultimate Member Social Login plugin that allows user role-based redirection settings. This feature ensures that users are redirected to specific pages based on their roles upon using social login.

Feature Description

This option has been added to the Social Login shortcode settings to handle user redirection based on the user role settings defined in Ultimate Member. When enabled, users will be redirected to the specified page for their role instead of returning to the page where the shortcode was used.

Steps to Implement the New Shortcode Option

Step 1: Update the Plugin

Ensure you have the latest Ultimate Member plugin and Social Login extension version installed.

Step 2: Add the Shortcode

Add the Social Login shortcode to the desired page:

  1. Go to wp-admin> Ultimate Member> Social Login> Add or Edit an existing Social Login Shortcode

  2. Go to  the General Settings of your social login shortcode and enable the option "Implement Role Redirection Options." By default, when a user logs in using the Social Login shortcode, they are redirected back to the page where the shortcode was used. However, if this option is checked, the Register or Login settings specified in the Assigned User Role settings will be applied instead.

  3. In the shortcode section, copy the shortcode of the social login.

  4. Navigate to the page where you want to implement the Social Login shortcode, go to wp-admin> Pages> add or edit a page.

  5. To add the following shortcode, paste it on the page. Then update or publish the page to save the changes.

Step 3: Configure User Role Redirection Settings

Configure the redirection settings for each user role in Ultimate Member:

  1. Go to WP Admin > Ultimate Member > User Roles.
  2. Select and edit the user role you want to configure.

  3. In the user role settings, navigate to Registration Options or Login Options. Here, you can customize the redirection settings according to your preference by configuring the "Action to be taken after registration" and "Action to be taken after login" options. 

Step 4: Test the Implementation

Test the functionality to ensure that users are redirected correctly based on their roles:

  1. Log in or Register to your site using a social account.

  2. Verify that the user is redirected to the specified page or URL for their role.

The new shortcode option for applying user role redirection settings enhances the flexibility of the Ultimate Member plugin by allowing role-based redirection. This ensures a more personalized user experience based on their roles within the website.