Only save currency if its different than current setting

This commit is contained in:
grandeljay 2022-11-30 14:43:40 +01:00
parent c596f7c1ad
commit 1606340af2

View file

@ -105,7 +105,7 @@ if (isset($_POST['user-id'], $_POST['section'])) {
}
/** 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() . '"';