Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 30, 20168 yr 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
June 30, 20168 yr 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() ); }
June 30, 20168 yr 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.
July 1, 20168 yr Author 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!
Archived
This topic is now archived and is closed to further replies.