Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($CFG_GLPI["use_mailing"]
- && countElementsInTable('glpi_notifications',
- "`itemtype`='User'
- AND `event`='passwordforget'
- AND `is_active`=1")) {
- echo '<a id="forget" href="front/lostpassword.php?lostpassword=1">'.
- __('Forgotten password?').'</a>';
- }
- <?php
- include ('../inc/includes.php');
- if (!$CFG_GLPI['use_mailing']
- || !countElementsInTable('glpi_notifications',
- "`itemtype`='User' AND `event`='passwordforget' AND `is_active`=1")) {
- exit();
- }
- $user = new User();
- // Manage lost password
- Html::simpleHeader(__('Forgotten password?'));
- // REQUEST needed : GET on first access / POST on submit form
- if (isset($_REQUEST['password_forget_token'])) {
- if (isset($_POST['email'])) {
- $user->updateForgottenPassword($_REQUEST);
- } else {
- User::showPasswordForgetChangeForm($_REQUEST['password_forget_token']);
- }
- } else {
- if (isset($_POST['email'])) {
- $user->forgetPassword($_POST['email']);
- } else {
- User::showPasswordForgetRequestForm();
- }
- }
- Html::nullFooter();
- exit();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement