diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-16 20:07:16 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-16 20:07:16 +0100 |
| commit | 7e94770e21f520580caf9994b6b88416a6ac9511 (patch) | |
| tree | 34207120a09765c63a8a6ed717b1bd19412ff8fb /dev/kernel/src/UserMgr.cc | |
| parent | 97fcfccebf502911371ce28a6b7f8be66c491cfd (diff) | |
fix: kernel: filesystem tweaks.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/UserMgr.cc')
| -rw-r--r-- | dev/kernel/src/UserMgr.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/dev/kernel/src/UserMgr.cc b/dev/kernel/src/UserMgr.cc index 5ee2aa33..fac6a3d0 100644 --- a/dev/kernel/src/UserMgr.cc +++ b/dev/kernel/src/UserMgr.cc @@ -89,14 +89,11 @@ Bool User::Save(const UserPublicKey password) noexcept { Bool User::Login(const UserPublicKey password) noexcept { if (!password || !*password) return No; - // now check if the password matches. - if (this->mUserFNV == Detail::user_fnv_generator(password, this)) { - kout << "User::Login: Password matches.\r"; - return Yes; - } + auto ret = this->mUserFNV == Detail::user_fnv_generator(password, this); - kout << "User::Login: Password doesn't match.\r"; - return No; + // now check if the password matches. + kout << (ret ? "User::Login: Password matches.\r" : "User::Login: Password doesn't match.\r"); + return ret; } Bool User::operator==(const User& lhs) { |
