Added more properties to the user class, and a few virtual methods.

This commit is contained in:
Relintai 2021-08-03 21:10:24 +02:00
parent a86b5c2670
commit 7f48c099e0
2 changed files with 37 additions and 0 deletions

View File

@ -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() {

View File

@ -4,6 +4,7 @@
#include "core/object.h"
#include <string>
#include <vector>
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<std::string> 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();