Fix Persona reloaded

When user is disconnected, current_user_mail must be null and not an empty
string
See #418
pull/426/head
Marien Fressinaud 11 years ago
parent 06abbd02c2
commit 4419df1da4
  1. 8
      app/views/helpers/javascript_vars.phtml

@ -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, '",',

Loading…
Cancel
Save