2021-07-07 12:20:05 +02:00
|
|
|
#ifndef USER_H
|
|
|
|
#define USER_H
|
|
|
|
|
2021-08-21 16:38:06 +02:00
|
|
|
#include "core/resource.h"
|
2021-07-07 12:20:05 +02:00
|
|
|
|
2021-08-21 18:28:29 +02:00
|
|
|
#include <mutex>
|
2021-07-07 12:20:05 +02:00
|
|
|
#include <string>
|
|
|
|
|
2021-08-05 01:19:54 +02:00
|
|
|
class Request;
|
2021-08-20 18:00:50 +02:00
|
|
|
class FormValidator;
|
2021-08-05 01:19:54 +02:00
|
|
|
|
2021-08-21 16:38:06 +02:00
|
|
|
class User : public Resource {
|
|
|
|
RCPP_OBJECT(User, Resource);
|
2021-08-05 01:19:54 +02:00
|
|
|
|
2021-07-07 12:20:05 +02:00
|
|
|
public:
|
2021-08-22 13:46:39 +02:00
|
|
|
std::string name_user_input;
|
|
|
|
std::string email_user_input;
|
|
|
|
int rank;
|
|
|
|
std::string pre_salt;
|
|
|
|
std::string post_salt;
|
|
|
|
std::string password_hash;
|
|
|
|
bool banned;
|
|
|
|
std::string password_reset_token;
|
|
|
|
bool locked;
|
2021-08-03 21:10:24 +02:00
|
|
|
|
2021-08-21 20:15:29 +02:00
|
|
|
std::string to_json(rapidjson::Document *into = nullptr);
|
|
|
|
void from_json(const std::string &data);
|
2021-08-21 18:28:29 +02:00
|
|
|
|
2021-07-07 12:20:05 +02:00
|
|
|
User();
|
|
|
|
~User();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|