Beispiel #1
0
/**
*
* @author Simon Wilkinson
* @version 1.0
* @copyright Copyright (c) 2014 The University of Nottingham
* @package
*/
require '../include/sysadmin_auth.inc';
require_once '../classes/userutils.class.php';
require_once '../include/errors.inc';
$userid = check_var('userID', 'GET', true, false, true);
if (!UserUtils::userid_exists($userid, $mysqli)) {
    $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
    $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
}
$username = UserUtils::get_username($userid, $mysqli);
$new_password = gen_password();
$success = UserUtils::update_password($username, $new_password, $userid, $mysqli);
if (!$success) {
    display_error($string['resetfailed'], $string['failuremsg'], $configObject->get('cfg_root_path') . '/artwork/exclamation_red_bg.png', '#C00000', true, true, true);
}
$mysqli->close();
?>
<!DOCTYPE html>
<html>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="content-type" content="text/html;charset=<?php 
echo $configObject->get('cfg_page_charset');
?>
" />