Attempt to fix pre selection of main currency
This commit is contained in:
parent
8cc8a5d501
commit
90ac147e2c
@ -129,9 +129,9 @@
|
||||
}
|
||||
}
|
||||
$_SESSION['avatar'] = $avatar;
|
||||
$_SESSION['main_currency'] = $main_currency;
|
||||
|
||||
if ($main_currency != $mainCurrencyId) {
|
||||
$_SESSION['main_currency'] = $main_currency;
|
||||
update_exchange_rate($db);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
session_start();
|
||||
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
||||
$username = $_SESSION['username'];
|
||||
$main_currency = $_SESSION['main_currency'];
|
||||
$sql = "SELECT * FROM user WHERE username = :username";
|
||||
$stmt = $db->prepare($sql);
|
||||
$stmt->bindValue(':username', $username, SQLITE3_TEXT);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user