Skip to content

Commit

Permalink
Portal bug fixes and features update (openemr#7600)
Browse files Browse the repository at this point in the history
* Portal bug fixes
- mised validation for username lenght change.
- PHP warnings

* review translation fixes
refactor register.php to twig template
register.php rewritten as register twig loader
  • Loading branch information
sjpadgett authored Aug 1, 2024
1 parent 9407d01 commit b3dd874
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 450 deletions.
9 changes: 4 additions & 5 deletions portal/account/index_reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require_once(dirname(__FILE__) . "/../../src/Common/Session/SessionUtil.php");
OpenEMR\Common\Session\SessionUtil::portalSessionStart();

$landingpage = "./../index.php?site=" . urlencode($_SESSION['site_id']);
$landingpage = "./../index.php?site=" . urlencode($_SESSION['site_id'] ?? '');
// kick out if patient not authenticated
if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite_two'])) {
$ignoreAuth_onsite_portal = true;
Expand Down Expand Up @@ -56,12 +56,11 @@

$sql = "SELECT " . implode(",", array(COL_ID, COL_PID, COL_POR_PWD, COL_POR_USER, COL_POR_LOGINUSER, COL_POR_PWD_STAT)) .
" FROM " . TBL_PAT_ACC_ON . " WHERE pid = ?";

$auth = privQuery($sql, array($_SESSION['pid']));
$password = trim($_POST['pass_current'] ?? '');
$password_new = trim($_POST['pass_new']);
$valid = ((!empty(trim($_POST['uname']))) &&
(!empty(trim($_POST['login_uname']))) &&
$password_new = trim($_POST['pass_new'] ?? '');
$valid = ((!empty(trim($_POST['uname'] ?? ''))) &&
(!empty(trim($_POST['login_uname'] ?? ''))) &&
(!empty($password)) &&
(!empty($password_new)) &&
(trim($_POST['uname']) == $auth[COL_POR_USER]) &&
Expand Down
Loading

0 comments on commit b3dd874

Please sign in to comment.