Skip to content

Commit

Permalink
Adjustments to prior commit (still working on message format)
Browse files Browse the repository at this point in the history
- message formatting
- minor PSR2 changes
- miscellaneous changes
  • Loading branch information
bradymiller committed Jul 22, 2017
1 parent 6dbd7e4 commit 64fe0f4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 39 deletions.
37 changes: 18 additions & 19 deletions interface/usergroup/user_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
/**
* User password change tool
*
* @package OpenEMR
* @link https://www.open-emr.org
* @author Roberto Vasquez <[email protected]>
* @copyright Copyright (C) 2017 Roberto Vasquez <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE CNU General Public License 3
*
*/
include_once("../globals.php");
include_once("$srcdir/auth.inc");
* @package OpenEMR
* @link https://www.open-emr.org
* @author Roberto Vasquez <[email protected]>
* @author Brady Miller <[email protected]>
* @copyright Copyright (c) 2017 Roberto Vasquez <[email protected]>
* @copyright Copyright (c) 2017 Brady Miller <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE CNU General Public License 3
*/

require_once("../globals.php");
require_once("$srcdir/auth.inc");

use OpenEMR\Core\Header;

if($GLOBALS['use_active_directory']) {
if ($GLOBALS['use_active_directory']) {
exit();
}
?>
Expand Down Expand Up @@ -58,7 +60,7 @@ function(data)
<?php

$ip=$_SERVER['REMOTE_ADDR'];
$res = sqlStatement("select fname,lname,username from users where id=?",array($_SESSION["authId"]));
$res = sqlStatement("select fname,lname,username from users where id=?", array($_SESSION["authId"]));
$row = sqlFetchArray($res);
$iter=$row;
?>
Expand All @@ -72,8 +74,8 @@ function(data)
</div>
<div class="row">
<div class="col-xs-12">
<div class='text-primary' id="display_msg"></div>
</div>
<div id="display_msg"></div>
</div>
</div>

<div class="row">
Expand Down Expand Up @@ -115,16 +117,13 @@ function(data)
<button type="Submit" class='btn btn-default btn-save'><?php echo xlt('Save Changes'); ?></button>
</div>
</div>
</form>
</div>
</div>
</div>


</FORM>

<br><br>
</BODY>
</HTML>
</body>
</html>

<?php
// da39a3ee5e6b4b0d3255bfef95601890afd80709 == blank
Expand Down
31 changes: 11 additions & 20 deletions interface/usergroup/user_info_ajax.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php
/**
*
* Controller to handle user password change requests.
*
* <pre>
Expand All @@ -10,27 +9,19 @@
* $_REQUEST['newPass'] - ciphertext of the new password to use
* $_REQUEST['newPass2']) - second copy of ciphertext of the new password to confirm proper user entry.
* </pre>
* Copyright (C) 2013 Kevin Yeh <[email protected]> and OEMR <www.oemr.org>
*
* LICENSE: This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://opensource.org/licenses/gpl-license.php>;.
*
* @package OpenEMR
* @author Kevin Yeh <[email protected]>
* @link https://www.open-emr.org
* @package OpenEMR
* @link https://www.open-emr.org
* @author Kevin Yeh <[email protected]>
* @author Brady Miller <[email protected]>
* @copyright Copyright (c) 2013 Kevin Yeh <[email protected]>
* @copyright Copyright (c) 2013 OEMR <www.oemr.org>
* @copyright Copyright (c) 2017 Brady Miller <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE CNU General Public License 3
*/



include_once("../globals.php");
require_once("../globals.php");
require_once("$srcdir/authentication/password_change.php");

$curPass=$_REQUEST['curPass'];
Expand All @@ -45,8 +36,8 @@
$errMsg='';
$success=update_password($_SESSION['authId'], $_SESSION['authId'], $curPass, $newPass, $errMsg);
if ($success) {
echo xlt("Password change successful");
echo "<div class='alert alert-success'>" . xlt("Password change successful") . "</div>";
} else {
// If update_password fails the error message is returned
echo text($errMsg);
echo "<div class='alert alert-danger'>" . text($errMsg) . "</div>";
}

0 comments on commit 64fe0f4

Please sign in to comment.