3 * User password change tool
6 * @link http://www.open-emr.org
7 * @author Roberto Vasquez <robertogagliotta@gmail.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2017 Roberto Vasquez <robertogagliotta@gmail.com>
10 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE CNU General Public License 3
14 require_once("../globals.php");
15 require_once("$srcdir/auth.inc");
17 use OpenEMR\Core\Header
;
19 if ($GLOBALS['use_active_directory']) {
25 <?php Header
::setupHeader(); ?
>
26 <title
><?php
echo xlt('Change Password'); ?
></title
>
28 <script src
="checkpwd_validation.js" type
="text/javascript"></script
>
30 <script language
='JavaScript'>
31 //Validating password and display message if password field is empty - starts
32 var webroot
='<?php echo $webroot?>';
33 function update_password()
40 $
.post("user_info_ajax.php",
42 curPass
: $
("input[name='curPass']").val(),
43 newPass
: $
("input[name='newPass']").val(),
44 newPass2
: $
("input[name='newPass2']").val(),
48 $
("input[type='password']").val("");
49 $
("#display_msg").html(data
);
58 <body
class="body_top" onload
="document.forms[0].curPass.focus()">
62 $res = sqlStatement("select fname,lname,username from users where id=?", array($_SESSION["authId"]));
63 $row = sqlFetchArray($res);
66 <div
class="container">
68 <div
class="col-xs-12">
69 <div
class="page-header">
70 <h3
><?php
echo xlt('Change Password'); ?
></h3
>
75 <div
class="col-xs-12">
76 <div id
="display_msg"></div
>
81 <div
class="col-xs-12">
82 <form method
='post' action
='user_info.php' class='form-horizontal' onsubmit
='return update_password()'>
83 <input type
=hidden name
=secure_pwd value
="<?php echo $GLOBALS['secure_password']; ?>">
84 <div
class="form-group">
85 <label
class='control-label col-sm-2'><?php
echo xlt('Full Name') . ":"; ?
></label
>
86 <div
class="col-sm-10">
87 <p
class="form-control-static"><?php
echo text($iter["fname"]) . " " . text($iter["lname"]) ?
></p
>
90 <div
class="form-group">
91 <label
class='control-label col-sm-2'><?php
echo xlt('User Name') . ":"; ?
></label
>
92 <div
class="col-sm-10">
93 <p
class="form-control-static"><?php
echo text($iter["username"]) ?
></p
>
96 <div
class="form-group">
97 <label
for='curPass' class='control-label col-sm-2'><?php
echo xlt('Current Password') . ":"; ?
></label
>
98 <div
class='col-sm-3'>
99 <input type
='password' class='form-control' name
='curPass' id
='curPass' value
="" autocomplete
='off'>
102 <div
class="form-group">
103 <label
class='control-label col-sm-2'><?php
echo xlt('New Password') . ":"; ?
></label
>
104 <div
class='col-sm-3'>
105 <input type
='password' class='form-control' name
='newPass' value
="" autocomplete
='off'>
108 <div
class="form-group">
109 <label
class='control-label col-sm-2'><?php
echo xlt('Repeat New Password') . ":"; ?
></label
>
110 <div
class='col-sm-3'>
111 <input type
='password' class='form-control' name
=newPass2 value
="" autocomplete
='off'>
114 <div
class="form-group">
115 <div
class='col-sm-offset-2 col-sm-10'>
116 <button type
="Submit" class='btn btn-default btn-save'><?php
echo xlt('Save Changes'); ?
></button
>
128 // da39a3ee5e6b4b0d3255bfef95601890afd80709 == blank