Title: Register Redirect
Last modified: August 21, 2016

---

# Register Redirect

 *  Resolved [ddirty](https://wordpress.org/support/users/ddirty/)
 * (@ddirty)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/)
 * Hey,
    First of all I love the plugin good job.
 * I have a request.
 * When someone registers with social login I want to redirect them to a url. That
   is DIFFERENT than the url i want to redirect them to at login.
 * It can be a hack/sloppy that I can make in the code. Any suggestions or help 
   would be great.
 * [https://wordpress.org/plugins/super-socializer/](https://wordpress.org/plugins/super-socializer/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Rajat Varlani](https://wordpress.org/support/users/the_champ/)
 * (@the_champ)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724429)
 * Hey,
    Thanks for appreciation. To redirect user to a different url after registration,
   follow the steps mentioned below: 1. Open “wp-content/plugins/super-socializer/
   inc/social_login.php” in code editor. 2. At line number 352, replace **`return
   array('status' => true, 'message' => '');`** with following and save the file:
 * `return array('status' => true, 'message' => 'registration');`
 * 3. Open “wp-content/plugins/super-socializer/js/front/social_login/common.js”
   in code editor.
    4. Search following code (beginning from line number 121):
 *     ```
       if(data.status == 1){
       			location.href = '<?php echo the_champ_get_login_redirection_url(); ?>';
       		}else if(data.message.match(/ask/) !== null){
       ```
   
 * 5. Replace the code searched above with following:
 *     ```
       if(data.status == 1){
       			if(data.message == 'registration'){
       				location.href = 'REDIRECTION_URL';
       			}else{
       				location.href = '<?php echo the_champ_get_login_redirection_url(); ?>';
       			}
       		}else if(data.message.match(/ask/) !== null){
       ```
   
 * 6. Replace `REDIRECTION_URL` in the above code with the full url (including http://
   or [https://](https://wordpress.org/support/topic/register-redirect-1/?output_format=md))
   where you want user to get redirected after registration and save the file.
 *  Thread Starter [ddirty](https://wordpress.org/support/users/ddirty/)
 * (@ddirty)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724514)
 * Thanks for taking the time to update me with this.
 * I tried these modifications in version 1.0.2 ( since 2.0 when I upgraded on my
   dev site the facebook/g+ buttons disappear also had some other bugs so I have
   been using 1.0.2 with no problems). However was unable to get the registration
   redirect working properly.
 * I edited line 330 in social_login.php to:
 *     ```
       // check if email exists in database
       		if(isset($profileData['email']) && $userId = email_exists($profileData['email'])){
       			// email exists in WP DB
       			the_champ_login_user($userId);
       			return true;
       ```
   
 * Changed it to
 *     ```
       // check if email exists in database
       		if(isset($profileData['email']) && $userId = email_exists($profileData['email'])){
       			// email exists in WP DB
       			the_champ_login_user($userId);
       			return array('status' => true, 'message' => 'registration');
       ```
   
 * Then in common.js i changed line 134
 *     ```
       if(data.status == 1){
       			location.href = '<?php echo the_champ_get_login_redirection_url(); ?>';
       		}
       ```
   
 * changed to
 *     ```
       if(data.status == 1){
       			if(data.message == 'registration'){
       				location.href = 'REDIRECTION_URL';
       			}else{ location.href = '<?php echo the_champ_get_login_redirection_url(); ?>'; }
       		}
       ```
   
 * However still on registration it stays on the page they registered on.
 * Any info on getting this working would be amazing, as right now its a fragmented
   experience for my users as if they register without social login they get pointed
   to a landing page with faq/help and social login register users are left in the
   dark/not proper flow.
 * Thanks again
    -Dave
 *  Plugin Author [Rajat Varlani](https://wordpress.org/support/users/the_champ/)
 * (@the_champ)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724515)
 * Hi, issues after upgrading the plugin might be due to the old javascript and 
   CSS files in your browser’s cache.
    After upgrading the plugin, clean you browser’s
   cache as mentioned at following link: [http://www.wikihow.com/Clear-Your-Browser’s-Cache](http://www.wikihow.com/Clear-Your-Browser's-Cache)
   After upgrading the plugin and cleaning your browser’s cache, follow the steps
   I mentioned you in previous reply. If issue persists, let me know your website
   url so that I can look into the issue?
 *  Thread Starter [ddirty](https://wordpress.org/support/users/ddirty/)
 * (@ddirty)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724522)
 * Hey The_champ,
    Thanks again for being so quick to reply.
 * My problem with 2.1.0 is that I have facebook/g+ setup in the admin panel but
   their login buttons do not show on the register/login. I got around this by editing
   the css (removing display:none and few other tweeks) all buttons are showing 
   up and working properly.
 * I do have a PROBLEM with the register redirect. It works fine for facebook/g+
   but when you do twitter with it, it does not redirect you. I assume it has to
   do with the save email prompt that you have to fill out. Could you send me the
   code modification I would have to do for twitter register redirect?
 * Thanks again! I do recommend adding a register redirect option in your next version
   as it is something that was very important to me and I have seen many other people
   asking/talking about this in other plugins/posts.
 * Thanks.
    -Dave
 *  Plugin Author [Rajat Varlani](https://wordpress.org/support/users/the_champ/)
 * (@the_champ)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724529)
 * Hey,
    The display property of the icons is kept “none” initially and as the login
   API of a particular social id provider is loaded, it is visible at your website.
   I could have helped you helped you with this if you had provided your website
   url. For Twitter register redirection: 1. Open “wp-content\plugins\super-socializer\
   js\front\social_login\common.js” in code editor. 2. Search following code:
 * `location.href = '<?php echo site_url(); ?>';`
 * 3. Replace the code searched above with following:
 * `location.href = 'REDIRECTION_URL';`
 * 4. Replace REDIRECTION_URL in above code with the url where you want the user
   to get redirected after registration. Save the file back.
    Sure, I will add this
   feature in next release.
 *  Thread Starter [ddirty](https://wordpress.org/support/users/ddirty/)
 * (@ddirty)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724537)
 * Thank you so much!
 * Everything is working as planned.
 * Thanks for considering adding this feature to next version. Thanks again!
 * -Dave

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Register Redirect’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/super-socializer_714345.svg)
 * [Social Share, Social Login and Social Comments Plugin - Super Socializer](https://wordpress.org/plugins/super-socializer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/super-socializer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/super-socializer/)
 * [Active Topics](https://wordpress.org/support/plugin/super-socializer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/super-socializer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/super-socializer/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [ddirty](https://wordpress.org/support/users/ddirty/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/register-redirect-1/#post-4724537)
 * Status: resolved