fix: ccda zip import and php warnings and deprecations (#7416)
[openemr.git] / interface / usergroup / user_info.php
blob85ffdb29f01d9fccedd00679513a19df6ceb6e65
1 <?php
3 /**
4 * User password change tool
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Roberto Vasquez <robertogagliotta@gmail.com>
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @author Ranganath Pathak <pathak@scrs1.org>
11 * @author Rod Roark <rod@sunsetsystems.com>
12 * @copyright Copyright (c) 2017 Roberto Vasquez <robertogagliotta@gmail.com>
13 * @copyright Copyright (c) 2017-2019 Brady Miller <brady.g.miller@gmail.com>
14 * @copyright Copyright (c) 2019 Ranganath Pathak <pathak@scrs1.org>
15 * @license https://github.com/openemr/openemr/blob/master/LICENSE CNU General Public License 3
18 require_once("../globals.php");
19 require_once("$srcdir/user.inc.php");
21 use OpenEMR\Common\Auth\AuthUtils;
22 use OpenEMR\Common\Csrf\CsrfUtils;
23 use OpenEMR\Core\Header;
24 use OpenEMR\OeUI\OemrUI;
26 if (AuthUtils::useActiveDirectory()) {
27 exit();
29 $userid = $_SESSION['authUserID'];
30 $user_name = getUserIDInfo($userid);
31 $user_full_name = $user_name['fname'] . " " . $user_name['lname'];
33 <html>
34 <head>
35 <?php Header::setupHeader(); ?>
36 <title><?php echo xlt('Change Password'); ?></title>
38 <script src="checkpwd_validation.js"></script>
40 <script>
41 //Validating password and display message if password field is empty - starts
42 var webroot=<?php echo js_escape($webroot); ?>;
43 function update_password()
45 top.restoreSession();
46 // Not Empty
47 // Strong if required
48 // Matches
50 $.post("user_info_ajax.php",
52 curPass: $("input[name='curPass']").val(),
53 newPass: $("input[name='newPass']").val(),
54 newPass2: $("input[name='newPass2']").val(),
55 csrf_token_form: <?php echo js_escape(CsrfUtils::collectCsrfToken()); ?>
57 function(data)
59 $("input[type='password']").val("");
60 $("#display_msg").html(data);
64 return false;
67 </script>
68 <?php
69 $arrOeUiSettings = array(
70 'heading_title' => xl('Change Password'),
71 'include_patient_name' => false,
72 'expandable' => false,
73 'expandable_files' => array(),//all file names need suffix _xpd
74 'action' => "",//conceal, reveal, search, reset, link or back
75 'action_title' => "",
76 'action_href' => "",//only for actions - reset, link or back
77 'show_help_icon' => false,
78 'help_file_name' => ""
80 $oemr_ui = new OemrUI($arrOeUiSettings);
82 </head>
83 <body class="body_top" onload="document.forms[0].curPass.focus()">
85 <?php
87 $res = sqlStatement("select fname,lname,username from users where id=?", array($_SESSION['authUserID']));
88 $row = sqlFetchArray($res);
89 $iter = $row;
91 <div id="container_div" class="<?php echo $oemr_ui->oeContainer();?>">
92 <div class="row">
93 <div class="col-sm-12">
94 <?php echo $oemr_ui->pageHeading() . "\r\n"; ?>
95 </div>
96 </div>
97 <div class="row">
98 <div class="col-sm-12">
99 <div id="display_msg"></div>
100 </div>
101 </div>
102 <div class="row">
103 <div class="col-sm-12">
104 <form method='post' action='user_info.php' class='form-horizontal' onsubmit='return update_password()'>
105 <input type=hidden name=secure_pwd value="<?php echo attr($GLOBALS['secure_password']); ?>">
106 <fieldset>
107 <legend><?php echo xlt('Change Password for') . " " . text($user_full_name); ?></legend>
108 <div class="form-group">
109 <label class='control-label col-sm-2'><?php echo xlt('Full Name') . ":"; ?></label>
110 <div class="col-sm-10">
111 <p class="form-control-static"><?php echo text($iter["fname"]) . " " . text($iter["lname"]) ?></p>
112 </div>
113 </div>
114 <div class="form-group">
115 <label class='control-label col-sm-2'><?php echo xlt('User Name') . ":"; ?></label>
116 <div class="col-sm-10">
117 <p class="form-control-static"><?php echo text($iter["username"]) ?></p>
118 </div>
119 </div>
120 <div class="form-group">
121 <label for='curPass' class='control-label col-sm-2'><?php echo xlt('Current Password') . ":"; ?></label>
122 <div class='col-sm-3'>
123 <input type='password' class='form-control' name='curPass' id='curPass' value="" autocomplete='off'>
124 </div>
125 </div>
126 <div class="form-group">
127 <label class='control-label col-sm-2'><?php echo xlt('New Password') . ":"; ?></label>
128 <div class='col-sm-3'>
129 <input type='password' class='form-control' name='newPass' value="" autocomplete='off'>
130 <!-- Password Strength Meter -->
131 <div id="password_strength_meter" class="progress">
132 <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:0%"></div>
133 </div>
134 <div id="password_strength_text"></div>
135 </div>
136 </div>
137 <div class="form-group">
138 <label class='control-label col-sm-2'><?php echo xlt('Repeat New Password') . ":"; ?></label>
139 <div class='col-sm-3'>
140 <input type='password' class='form-control' name=newPass2 value="" autocomplete='off'>
141 </div>
142 </div>
143 </fieldset>
144 <div class="form-group">
145 <div class='offset-sm-2 col-sm-10'>
146 <button type="Submit" class='btn btn-secondary btn-save'><?php echo xlt('Save Changes'); ?></button>
147 </div>
148 </div>
149 </form>
150 </div>
151 </div>
152 </div><!--end of container div -->
153 <?php $oemr_ui->oeBelowContainerDiv();?>
155 </body>
156 </html>
158 <?php
159 // da39a3ee5e6b4b0d3255bfef95601890afd80709 == blank