mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🐛 del user funcs didn't grab save lock
This commit is contained in:
parent
34873d702b
commit
795671d685
1 changed files with 2 additions and 0 deletions
|
|
@ -41,10 +41,12 @@ public:
|
|||
|
||||
bool DelUser(const std::string &name, const std::string &attempt)
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock{save_lock};
|
||||
return users.erase_if(name, [&attempt](const User &u) { return (attempt == u.password); });
|
||||
}
|
||||
bool AdminDelUser(const std::string &name, const std::string &attempt)
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock{save_lock};
|
||||
return users.erase_if(name, [this, &attempt](const User &) { return (admin_pass == attempt); });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue