summaryrefslogtreecommitdiffhomepage
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/KernelKit/User.h5
-rw-r--r--src/kernel/src/User.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/KernelKit/User.h b/src/kernel/KernelKit/User.h
index 6711bce7..cc64bd1c 100644
--- a/src/kernel/KernelKit/User.h
+++ b/src/kernel/KernelKit/User.h
@@ -82,10 +82,15 @@ class User final {
/// @param password the password to check.
Bool Login(const UserPublicKey password);
+ /// @brief Returns whether the user is an adult or not.
+ Bool IsAdult();
+
private:
UserRingKind mUserRing{UserRingKind::kRingStdUser};
Char mUserName[kMaxUserNameLen] = {0};
UInt64 mUserFNV{0UL};
+ Bool mUserIsAdult{NO};
+
};
/// \brief Alias for user ptr.
diff --git a/src/kernel/src/User.cpp b/src/kernel/src/User.cpp
index daaf27a4..6fd2e7b3 100644
--- a/src/kernel/src/User.cpp
+++ b/src/kernel/src/User.cpp
@@ -66,6 +66,8 @@ User::User(const UserRingKind& ring_kind, const UserPublicKeyType* user_name)
////////////////////////////////////////////////////////////
User::~User() = default;
+Bool User::IsAdult() { return mUserIsAdult; }
+
Bool User::Save(const UserPublicKey password) {
if (!password || *password == 0) return No;