By default, the currency that the customer selects with the currency switch is saved in the cookie. I would like the currency that the client selects with the switch to be saved in the database, so that after logging in (from another device or after clearing the cache) it would have the same currency set.
Is there a module for this or is it better to do it by overwriting the setCurrency function in Tools.php?
I have programming knowledge but I am afraid that the currency mechanism is more complicated and various problems may arise after modification.