CA3LEOctober 30, 2015 in Help & Support
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.
Anyone have a clue what I'm talking about? Are there any options for the way the sign out redirection works?
Okay, guess I have to do it myself.
Here's how to fix that for anyone searching. Unfortunately had to dig into the code.
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 ) );
\IPS\Output::i()->redirect( \IPS\Login::getDestination() );
\IPS\Output::i()->redirect( $redirectUrl->setQueryString( '_fromLogout', 1 ) );
\IPS\Output::i()->redirect( $redirectUrl );
For some reason it always forwards to my board index without this modification to the code.
Sweet, posted this to the bug tracker and it's been marked fixed as of the next release, 4.1.3. Thanks IPS!
This topic is now archived and is closed to further replies.
Started Thursday at 02:03 PM
Started 3 hours ago
Started January 10