Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
CA3LE Posted October 30, 2015 Posted October 30, 2015 Instead of redirecting to the page the sign out was initiated from it now goes to the board index. How can I get back to the previous behavior. For specific application needs, I need it to forward back to the page the user clicked "sign out" on. Sign in redirection works great. Forwards right back to my application like I need it to but since the upgrade from 4.0 to 4.1.1 sign out goes to the back to the index.
CA3LE Posted October 31, 2015 Author Posted October 31, 2015 Anyone have a clue what I'm talking about? Are there any options for the way the sign out redirection works?
CA3LE Posted November 1, 2015 Author Posted November 1, 2015 Okay, guess I have to do it myself. Here's how to fix that for anyone searching. Unfortunately had to dig into the code. /public_html/ipb/applications/core/modules/front/system/login.php comment out line 209 (as of 4.1.2) //$redirectUrl = ( $referrer->isInternal and isset( $referrer->queryString['do'] ) and $referrer->queryString['do'] != 'validating' ) ? $referrer : \IPS\Http\Url::internal(''); Add the following line from version 4.0 $redirectUrl = ( !empty( $_SERVER['HTTP_REFERER'] ) ) ? \IPS\Http\Url::external( $_SERVER['HTTP_REFERER'] ) : \IPS\Http\Url::internal( '' ); I also didn't like the added query string... \IPS\Output::i()->redirect( \IPS\Login::getDestination()->setQueryString( '_fromLogin', 1 ) ); change to \IPS\Output::i()->redirect( \IPS\Login::getDestination() ); \IPS\Output::i()->redirect( $redirectUrl->setQueryString( '_fromLogout', 1 ) ); change to \IPS\Output::i()->redirect( $redirectUrl ); ... fixed. For some reason it always forwards to my board index without this modification to the code.
CA3LE Posted November 2, 2015 Author Posted November 2, 2015 Sweet, posted this to the bug tracker and it's been marked fixed as of the next release, 4.1.3. Thanks IPS!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.