Buschiq Posted June 30, 2016 Share Posted June 30, 2016 One feature I would really like to see is the ability to redirect members directly to their profiles when logging in. Perhaps not useful to everyone, but for those of us who run social communitys (meeting new friends, dating etc) it would be a treat! I want to be able to choose where a member is directed when they log in or register, if it's to the forums, to their profile or to some specific page. I use Pages as my starting page and when they log in or register there, that's where they end up and that's not really the best choice. Thanks Link to comment Share on other sites More sharing options...
Aiwa Posted June 30, 2016 Share Posted June 30, 2016 Create a simple app and add a memberSync extension with this code. /** * Member has logged on * * @param \IPS\Member $member Member that logged in * @param \IPS\Http\Url $redirectUrl The URL to send the user back to * @return void */ public function onLogin( $member, $returnUrl ) { \IPS\Output::i()->redirect( member->url() ); } Link to comment Share on other sites More sharing options...
Aiwa Posted June 30, 2016 Share Posted June 30, 2016 The above works, but has the potential to cause problems with Nexus / Commerce check-out if you create an account during the check-out process. The best bet may be to overload \IPS\Member::memberSync, analyze the $params variable passed to it and alter it as required before it's sent to app memberSync extensions. Link to comment Share on other sites More sharing options...
Buschiq Posted July 1, 2016 Author Share Posted July 1, 2016 19 hours ago, Aiwa said: Create a simple app and add a memberSync extension with this code. /** * Member has logged on * * @param \IPS\Member $member Member that logged in * @param \IPS\Http\Url $redirectUrl The URL to send the user back to * @return void */ public function onLogin( $member, $returnUrl ) { \IPS\Output::i()->redirect( member->url() ); } If I knew how, I would. But thanks! Link to comment Share on other sites More sharing options...
Adriano Faria Posted July 1, 2016 Share Posted July 1, 2016 You can do it via plugin as well. No need for an app. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.