Version: 1.0.0
Template: wistie (though it seems to occur with any)
I stumbled on a behavior I haven't been able to isolate to a root cause. When viewing the "Profile" page (user.php) and logging out, the user receives the following warning:
"Warning: Cannot modify header information - headers already sent by (output started at /public_html/user.php:1) in user.php line 72"
Logging from any other page does not cause an issue.
This line is the header that redirect the user (see below, header('Location: ./')after logging out as below.
Not sure what headers are already being sent in this use case and I hope someone can isolate it.PHP Code:// if not logged in, redirect to the index page
$login = isset($_GET['login']) ? sanitize($_GET['login'], 3) : '';
$truelogin = isset($_COOKIE['mnm_user'] ) ? sanitize($_COOKIE['mnm_user'] , 3) : '';
if($login === ''){
if ($current_user->user_id > 0) {
$login = $current_user->user_login;
} else {
header('Location: ./');
die;
}
}
To recreate the issue:
1. Log in
2. Click on the link, "Profile"
3. Click on the link, "Logout"



after logging out as below.
Reply With Quote



