mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
✨ VerifyPassword
This commit is contained in:
parent
f7d10ca6e1
commit
5520d508ff
1 changed files with 9 additions and 0 deletions
|
|
@ -89,6 +89,15 @@ public:
|
|||
return state;
|
||||
}
|
||||
|
||||
int_fast32_t VerifyPassword(const std::string &name, const std::string &attempt) const
|
||||
{
|
||||
int_fast32_t res = -1;
|
||||
users.if_contains(name, [&res, &attempt](const User &u) {
|
||||
res = u.password == attempt;
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
void Save()
|
||||
{
|
||||
Json::StreamWriterBuilder builder;
|
||||
|
|
|
|||
Loading…
Reference in a new issue