Fix wrong redirection when using custom pages + show flash messages

BT#17022
pull/3178/head
Julio Montoya 6 years ago
parent a353f96ebb
commit b69fb3a089
  1. 9
      custompages/index-unlogged-dist.php
  2. 4
      main/auth/lostPassword.php

@ -75,9 +75,12 @@ $rootWeb = api_get_path('WEB_PATH');
</div> <!-- #header -->
<div id="login-form-box" class="form-box">
<div id="login-form-info" class="form-info">
<?php if (isset($content['info']) && !empty($content['info'])) {
echo $content['info'];
}
<?php
echo Display::getFlashToString();
Display::cleanFlashMessages();
if (isset($content['info']) && !empty($content['info'])) {
echo $content['info'];
}
?>
</div>
<?php if (isset($error_message)) {

@ -36,13 +36,13 @@ $tool_name = get_lang('LostPassword');
if ($reset && $userId) {
$messageText = Login::reset_password($reset, $userId, true);
if (CustomPages::enabled() && CustomPages::exists(CustomPages::INDEX_UNLOGGED)) {
/*if (CustomPages::enabled() && CustomPages::exists(CustomPages::INDEX_UNLOGGED)) {
CustomPages::display(
CustomPages::INDEX_UNLOGGED,
['info' => $messageText]
);
exit;
}
}*/
Display::addFlash(
Display::return_message($messageText, 'info', false)

Loading…
Cancel
Save