exit; } $userResetPasswordSetting = api_get_setting('user_reset_password'); if ($userResetPasswordSetting === 'true') { $user = Database::getManager()->getRepository('ChamiloUserBundle:User')->find($user['uid']); Login::sendResetEmail($user, true); if (CustomPages::enabled() && CustomPages::exists(CustomPages::INDEX_UNLOGGED)) { CustomPages::display(CustomPages::INDEX_UNLOGGED, ['info' => get_lang('CheckYourEmailAndFollowInstructions')]); exit; } header('Location: ' . api_get_path(WEB_PATH)); exit; } $messageText = Login::handle_encrypted_password($user, true); if (CustomPages::enabled() && CustomPages::exists(CustomPages::INDEX_UNLOGGED)) { CustomPages::display(CustomPages::INDEX_UNLOGGED, ['info' => $messageText]); exit; } Display::addFlash(Display::return_message($messageText)); header('Location: ' . api_get_path(WEB_PATH)); exit; } if (CustomPages::enabled() && CustomPages::exists(CustomPages::LOST_PASSWORD)) { CustomPages::display(CustomPages::LOST_PASSWORD, ['form' => $form->returnForm()]); exit; } $controller = new IndexManager($tool_name); $controller->set_login_form(); $controller->tpl->assign('form', $form->returnForm()); $template = $controller->tpl->get_template('auth/lost_password.tpl'); $controller->tpl->display($template);