Redirect to a different page?

Redirect to a different page?

Hello!  First of all, I love this plug-in! It already helps a ton! 

The only problem I see with this plugin (for me anyways) is that I had the users redirected to a "downloads" area after a successful login and now with the plugin, they are sent to the home page. Most of my "users" are going to get lost even though I have a big "downloads" button on the home page.  Is there a simple way to redirect them to a different page after password change??  Any help or advice would be greatly appreciated!  Thanks!

Edited by: jmiller - Jul-27-10 13:35:21
jmiller
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Redirect to a different page?

Unfortunately, there isn't a way to do it in the plugin.  Once the plugin redirects the user to the "Edit Profile" page, it's out of our hands.  When they save on that page, Joomla core determines where to send them next.  I just looked at how Joomla handles the user after a save, and they have it hard-coded to redirect to the home page.

If you wanted to change this manually, so that a user is always redirected to a certain page after saving their profile (not just on first login), you can modify the following file.  Please note that this is modifying core functionality and may get erased if you upgrade Joomla.
In /components/com_user/controller.php, ~ line 77
// get the redirect
$return = JURI::base();

Change the JURI::base(); to whatever page you want them to go to.  This should be the 'raw' URL (not SEF), like so:
index.php?option=blah&task=view&...

Hope this helps, and thanks for the kudos.  We hope you'll leave a positive review on the JED with your feedback!

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23813 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Redirect to a different page?

Thanks for getting back to me so quickly.  I don't think I would feel comfortable changing the core code but I think I may have a work around solution... would there be a way to update the "your settings have been saved" message once you hit the homepage? If I could add a line saying "please click downloads" or something to that nature, I think it would work ok. Is that possible?  current/smile

https://www.sourcecoast.com/components/com_agora/img/members/1155/Message-on-homepage.png

jmiller
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Redirect to a different page?

Now that's something I can help with current/smile

That string is defined in the com_user language file below. You can modify the string to be whatever you want it to be, as well as having a link in it.  The file is located at:
/languages/en-gb/en-GB.com_user.ini
Change:
YOUR SETTINGS HAVE BEEN SAVED.=Your settings have been Saved.
to something like:
YOUR SETTINGS HAVE BEEN SAVED.=Thanks for updating your password. Please click <a href="blah">here to download!</a>

Hope this helps, and good idea to get around your issue!

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23813 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Redirect to a different page?

Thank You so much Alzander! It works perfectly!  I'm heading over to JED to leave a review now... wonderful product and thank you for answering my questions and making the product work perfect for me!  Thanks again!!!  current/smile

jmiller
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11498
Total Polls:
0
Total Posts:
48411
Posts today:
4
User Info
 
Total Users:
47473
Newest User:
martinpleon
Members Online:
1
Guests Online:
578

Online: 
cyberspyder
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program