summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/UserMgr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dev/kernel/src/UserMgr.cc')
-rw-r--r--dev/kernel/src/UserMgr.cc11
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) {