Fix Persona reloaded

When user is disconnected, current_user_mail must be null and not an empty
string
See #418
This commit is contained in:
Marien Fressinaud
2014-02-11 22:35:54 +01:00
parent 06abbd02c2
commit 4419df1da4

View File

@@ -32,7 +32,13 @@ if (Minz_Request::param ('output') === 'global') {
$authType = Minz_Configuration::authType();
if ($authType === 'persona') {
echo 'current_user_mail="' . Minz_Session::param ('mail', '') . '",';
// If user is disconnected, current_user_mail MUST be null
$mail = Minz_Session::param ('mail', false);
if ($mail) {
echo 'current_user_mail="' . $mail . '",';
} else {
echo 'current_user_mail=null,';
}
}
echo 'authType="', $authType, '",',