diff --git a/modules/users/user.cpp b/modules/users/user.cpp index 1b78b04..4061e13 100644 --- a/modules/users/user.cpp +++ b/modules/users/user.cpp @@ -1,8 +1,34 @@ #include "user.h" +void User::save() { + +} + +void User::load() { + +} + +void User::load(const std::string &p_name) { + name = p_name; + + load(); +} + +void User::changed() { + save(); +} + +void User::update() { + +} + User::User() : Object() { + id = 0; + rank = 0; + banned = false; + locked = false; } User::~User() { diff --git a/modules/users/user.h b/modules/users/user.h index b51bb36..f727cae 100644 --- a/modules/users/user.h +++ b/modules/users/user.h @@ -4,6 +4,7 @@ #include "core/object.h" #include +#include class User : public Object { public: @@ -14,6 +15,16 @@ public: std::string pre_salt; std::string post_salt; std::string password_hash; + bool banned; + std::vector sessions; + std::string password_reset_token; + bool locked; + + virtual void save(); + virtual void load(); + virtual void load(const std::string &p_name); + virtual void changed(); + virtual void update(); User(); ~User();