along with GLPI; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -------------------------------------------------------------------------- */ // ---------------------------------------------------------------------- // Original Author of file: // Purpose of file: // ---------------------------------------------------------------------- define('GLPI_ROOT', '..'); include GLPI_ROOT . "/inc/includes.php"; $user = new User(); // Manage lost password simpleHeader($LANG['users'][3]); if (!$CFG_GLPI['use_mailing']) { exit; } if (isset($_REQUEST['token'])) { if (isset($_REQUEST['email'])) { $user->updateForgottenPassword($_REQUEST); } else { User::showPasswordForgetChangeForm($_REQUEST['token']); } } else { if (isset($_REQUEST['email'])) { $user->forgetPassword($_REQUEST['email']); } else { User::showPasswordForgetRequestForm(); } } nullFooter(); exit;
You should have received a copy of the GNU General Public License along with GLPI. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ /** @file * @brief */ 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;
<?php session_start(); require_once "lib/config.inc.php"; require_once "lib/classes/User.php"; require_once "lib/encryption.inc.php"; $encryptObj = new Encryption(); $UserObj = new User(); if (isset($_POST['frmSubmit']) && $_POST['frmSubmit'] == "yes") { $UserId = $_POST['user_id']; $UserObj->forgetPassword($UserId); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome To <?php echo SITE_TITLE; ?> </title> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" /> <style> input[type="text"],input[type="Password"] { padding: 9px; width: 90%; font-size: 1.1em; border: 2px solid#EAEEF1; color: #666666; background:#EAEEF1;