mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Added more properties to the user class, and a few virtual methods.
This commit is contained in:
parent
a86b5c2670
commit
7f48c099e0
@ -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() {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user