Forum
Members app, logout not working
Hi, I have a logout page with the following code...
<?php
include('../cms/runtime.php');
perch_member_log_out();
PerchUtil::redirect('/users/');
?>
...but members aren't being logged out and the redirect isn't working. It's only when I hit the refresh that the member is logged out? The same thing is happening to any pages that use...
<?php if (perch_member_logged_in()) { ?>
<?php } else { ?>
<?php } ?>
Any assistance would be appreciated!
Do you get any errors or anything like that?
I ran into this exact same problem.
The issue was with text/html HTTP caching in the .htaccess file. After removing HTTP Caching users can once again logout without refreshing the redirect page.