Skip to content

Commit

Permalink
Only save currency if its different than current setting
Browse files Browse the repository at this point in the history
  • Loading branch information
grandeljay committed Nov 30, 2022
1 parent c596f7c commit 1606340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
}

/** Currency */
if (isset($_POST['user-currency']) && $_POST['user-currency'] !== $_SESSION['user']->getLocale()) {
if (isset($_POST['user-currency']) && $_POST['user-currency'] !== $_SESSION['user']->getLocale() && $_POST['user-currency'] !== $_SESSION['user']->getCurrency()) {
$_SESSION['user']->setCurrency($_POST['user-currency']);

$set[] = '`currency` = "' . $_SESSION['user']->getCurrency() . '"';
Expand Down

0 comments on commit 1606340

Please sign in to comment.