Added a user module and a (simple for now) User class.

This commit is contained in:
Relintai 2021-07-07 12:20:05 +02:00
parent 9b0a8eb970
commit f21b4362c6
4 changed files with 70 additions and 0 deletions

12
modules/users/SCsub Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python
Import("env_mod")
Import("env")
env_mod.core_sources = []
env_mod.add_source_files(env_mod.core_sources, "*.cpp")
# Build it all as a library
lib = env_mod.add_library("users", env_mod.core_sources)
env.Prepend(LIBS=[lib])

27
modules/users/detect.py Normal file
View File

@ -0,0 +1,27 @@
import os
import platform
import sys
def is_active():
return True
def get_name():
return "users"
def can_build():
return True
def get_opts():
return []
def get_flags():
return []
def configure(env):
pass

9
modules/users/user.cpp Normal file
View File

@ -0,0 +1,9 @@
#include "user.h"
User::User() :
Object() {
}
User::~User() {
}

22
modules/users/user.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef USER_H
#define USER_H
#include "core/object.h"
#include <string>
class User : public Object {
public:
int id;
std::string name;
std::string email;
int rank;
std::string pre_salt;
std::string post_salt;
std::string password_hash;
User();
~User();
};
#endif