By Ashley Rosenthal on Saturday, 19 April 2014
Posted in General
Replies 28
Likes 0
Views 4K
Votes 0
I was wondering how I could have EasySocial redirect to a page other than my dashboard after a user registers?
Hello Justin,

It is currently not possible out of the box because there is no such settings for the profile type currently. However, in order to achieve what you want, you can customize the codes in the file /components/com_easysocial/views/registration/view.html.php and at line 760, you could use a similar code as below and apply your own logics.


if ($profile->id = 1) {
//do redirection url here
}

if ($profile->id = 2) {
//do another redirection url here
}


The profile id, can be found at the back end of the profile types area. Hope these help
·
Monday, 23 February 2015 15:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ashley,

You can just configure this in the back end of EasySocial's settings page under the "Settings" > "Users" tab. Just set the login redirection url accordingly
·
Saturday, 19 April 2014 02:57
·
0 Likes
·
0 Votes
·
0 Comments
·
I did that and it still goes to the dashboard page after I register. Do you have any other suggestions?
·
Saturday, 26 April 2014 23:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ashley,

I am really sorry for the delay of this reply as it is a weekend for us here. Ah, that particular settings are not for "registrations" and it's only for "login redirections". I will try to see if I can apply a quick hack for this in the next minor release of 1.2.9
·
Sunday, 27 April 2014 03:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark, did you manage to implement this setting?
·
Wednesday, 25 June 2014 18:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

If your registration process is configured to automatically log the user in, it will redirect the user to the page that you specified in the settings already
·
Wednesday, 25 June 2014 23:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Thanks for the reply.

Like the original poster, I'm actually looking for a welcome page for directing users to only once they have registered.

"Welcome and thanks for registering"

JomSocial and Community Builder have this. It is also essential for Google Adwords conversion tracking. You need a 'success page.
·
Wednesday, 25 June 2014 23:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,

We actually have this and this is only available if you use the normal registration activation. If your user is automatically activated and logged in, they get redirected to the page that you specify after successful login.
·
Wednesday, 25 June 2014 23:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Great, I need to put some google tracking code on that page. Where can I put it?
·
Thursday, 26 June 2014 00:16
·
0 Likes
·
0 Votes
·
0 Comments
·
It depends on what is the registration settings for the profile type that you have chosen. The theme files are located in /components/com_easysocial/themes/wireframe/registration/
·
Thursday, 26 June 2014 11:58
·
0 Likes
·
0 Votes
·
0 Comments
·
So after we set the registration to Normal Registration (Manual Login) where do we go to set the post registration redirect? Is it a setting or a file customization? And can we designate a different redirect for each Profile Type?
·
Monday, 23 February 2015 14:20
·
0 Likes
·
0 Votes
·
0 Comments
·
@Ezrul,

Thank you very much for the prompt reply. I have navigated to that file and added the changes per your post, however I did not get the redirection. I assume that I am making an error in the format of the url. This is what I entered:

if ($profile->id = 1) {
//index.php/en/thank-you-1
}

if ($profile->id = 2) {
//index.php/en/thank-you-1
}


Is that correct?

Or should it be :
if ($profile->id = 1) {
http://www.myurl.com/index.php/en/thank-you-1
}

if ($profile->id = 2) {
http://www.myurl.com/index.php/en/thank-you-1
}


or some other format?

Thx,
JS
·
Monday, 23 February 2015 16:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

You need to use the redirection function in order for it to work. Here is an example,

if ($profile->id = 1 {
$url = 'http://www.myurl.com/index.php/en/thank-you-1'
return $this->redirect($url);
}
·
Monday, 23 February 2015 16:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Ezrul Fazwan wrote:

Hello Justin,

You need to use the redirection function in order for it to work. Here is an example,

if ($profile->id = 1 {
$url = 'http://www.myurl.com/index.php/en/thank-you-1'
return $this->redirect($url);
}


OK, So i added the code just as you illustrated and now when I go to register I get a blank white screen. Removing the code the registration appears as normal.

Any thoughts?

This is what I specifically pasted into the file at line 760:

if ($profile->id = 1 {
$url = 'http://www.myurl.com/index.php/en/thank-you'
return $this->redirect($url);
}
if ($profile->id = 2 {
$url = 'http://www.myurl.com/index.php/en/thank-you-2'
return $this->redirect($url);
}
if ($profile->id = 3 {
$url = 'http://www.myurl.com/index.php/en/thank-you-3'
return $this->redirect($url);
}
if ($profile->id = 4 {
$url = 'http://www.myurl.com/index.php/en/thank-you-4'
return $this->redirect($url);
}
if ($profile->id = 5 {
$url = 'http://www.myurl.com/index.php/en/thank-you-5'
return $this->redirect($url);
}
if ($profile->id = 6 {
$url = 'http://www.myurl.com/index.php/en/thank-you-6'
return $this->redirect($url);
}
·
Monday, 23 February 2015 17:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

I am sorry as I wrote the code without the proper syntax. My previous code is actually have some syntax error.
Follow the example below :

if ($profile->id = 1) {
$url = 'http://www.myurl.com/index.php/en/thank-you-1';
return $this->redirect($url);
}


Can you verify it again?
·
Monday, 23 February 2015 18:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Dear Ezrul,

That works perfectly. Thank you! Of course, I had to reapply the strings after updating from ES 1.3.17 to ES 1.3.18, but I have the code saved to a text file so it was a piece of cake.

It would be nice if this function makes it into ES natively the way it is for ED and EB, but for now, thank you for the work around.

JS
·
Tuesday, 24 February 2015 05:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Justin,

You are most welcome
·
Tuesday, 24 February 2015 12:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

This is something i'm looking for

Could you kindly let me know the $url for "stay on the same page"? Currently it goes to Dashboard after successful registration.

regards,
·
Monday, 16 March 2015 23:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Looks like this is inbuilt in v1.3.21
·
Tuesday, 17 March 2015 00:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, that's correct This is added internally in 1.3.21
·
Tuesday, 17 March 2015 00:35
·
0 Likes
·
0 Votes
·
0 Comments
·
This doesn't seem to be working for login form though. I want Profile Type with ID 3 be sent to welcome page after adding it here:

/components/com_easysocial/views/login/view.html.php


if ($profile->id = 3) {
$url = 'http://www.myurl.com/welcome/';
return $this->redirect($url);
}
·
Wednesday, 01 April 2015 22:20
·
0 Likes
·
0 Votes
·
0 Comments
·
I am sorry but we do not provide support for customizations.
·
Thursday, 02 April 2015 02:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark, can you add an option to redirect users after registration please ?
i think many people are interested in this too

(don"t tell me to add it in voices because its already done )
http://stackideas.com/voices/item/1131
·
Monday, 04 April 2016 02:45
·
0 Likes
·
0 Votes
·
0 Comments
·
If it was already added on the voices page, then vote for it
·
Monday, 04 April 2016 10:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark, no its not on voices, i created new one

I tryied to add the code in the file ( /components/com_easysocial/views/login/view.html.php) and dont work, perhaps the file structure changed ?
·
Monday, 04 April 2016 17:13
·
0 Likes
·
0 Votes
·
0 Comments
·
His scenario is entirely different, therefore you can't achieve similar objective with the same codes.
·
Tuesday, 05 April 2016 01:03
·
0 Likes
·
0 Votes
·
0 Comments
·
We have the same problem. The user shout be redirected after registration to the shopping-card from HikaShop


Login-Layout in HikaShop


<?php

$app = JFactory::getApplication();
$document = &JFactory::getDocument();

// Easysocial Login Modul
$renderer = $document->loadRenderer('modules');
$position = 'easyloginshop';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);

// Easysocial Miniregistration Modul
$renderer = $document->loadRenderer('modules');
$position = 'easyregistrationshop';
$options = array('style' => 'raw');
echo $renderer->render($position, $options, null);

// Set rewrite URL Cookie
$jinput = $app->input;
$jcookie = $jinput->cookie;

$jcookie->set('easysocialloginurl', JURI::current(), 0);

?>


// Thats the idea to redirect after login


<?php

$app = JFactory::getApplication();
$cookie_name = 'easysocialloginurl';

$jinput = $app->input;
$jcookie = $jinput->cookie;

$cookie_value = $jcookie->get($cookie_name, NULL);

if ($cookie_value) {
// Cookie delete
$jcookie->set($cookie_name, NULL, time() - 1);
// set rewrite url
$url = $cookie_value;
}
·
Wednesday, 21 September 2016 20:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing Torsten.
·
Wednesday, 21 September 2016 22:40
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post