tml_redirect_url( $url, $action ) // remove action if possible
-
Dear Jeff
Is there a chance to remove $action from tml_redirect_url filter as my filer is hooked to register or login action and all the time after refreshing page $action is saved, even that you didn’t click on the form.
Example:
## FILTER ##
function tml_redirect_url( $url, $action ) {
if (get_the_ID() == 82 ) {
if ( ‘login’ == $action ) {
$_SESSION[‘logged-in’] = 1;
$url = ‘https://redirect’;
}
}
return $url; // always needs to return $url back to the filter
}
add_filter( ‘tml_redirect_url’, ‘tml_redirect_url’, 10, 2 );
## END FILTER ##
Scenario: 1. User log-in. User log-out. Refreshing page will trigger tml_redirect_url again and set $_SESSION[‘logged-in’].post scriptum
I’m not using session to verify is somebody is log-in ??
- The topic ‘tml_redirect_url( $url, $action ) // remove action if possible’ is closed to new replies.