mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
🐛 ChangePassword accidentately didnt set new pass
This commit is contained in:
parent
8aa4581ffb
commit
1c7b2f67fe
2 changed files with 8 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ public:
|
||||||
const bool state = (password == attempt);
|
const bool state = (password == attempt);
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
password == new_pass;
|
password = new_pass;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
9
main.cpp
9
main.cpp
|
|
@ -3,8 +3,13 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
User x(1000, "pass123");
|
User a(1000, "pass123");
|
||||||
std::cout << x.ChangePassword("pass123", "newpass123");
|
User b(0, "pass123");
|
||||||
|
std::cout << a.ChangePassword("pass123", "newpass123") << '\n';
|
||||||
|
std::cout << SendFunds(a, b, 250, "newpass123") << '\n';
|
||||||
|
a.GetBal();
|
||||||
|
a.VerifyPassword("newpass124");
|
||||||
|
std::cout << a.GetBal() << '\n';
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue