start working on User and Group classes

- User and Group has been moved to 'models' directory
- removed UserPass struct (passwords fields were put to User struct)
not working yet, we need support for binary blobs in morm
This commit is contained in:
2021-04-30 01:34:48 +02:00
parent ccda2bc2fd
commit 4277f90bad
29 changed files with 363 additions and 200 deletions

View File

@@ -162,11 +162,11 @@ return true;
*/
bool AddUser::AddNewUser(User & user, const std::wstring & pass)
{
up.has_pass = true;
up.pass = pass;
system->crypt.PassHashCrypt(up);
user.has_pass = true;
user.password = pass;
system->crypt.PassHashCrypt(user);
if( db->AddUser(user, up) == WINIX_ERR_OK )
if( user.insert() )
{
if( system->users.AddUser(user) )
{
@@ -213,7 +213,10 @@ bool AddUser::AddNewUser(const std::wstring & login,
bool try_login,
bool use_ses_log)
{
user.Clear();
user.set_connector(model_connector);
user.clear();
//user.Clear();
user.name = login;
user.email = email;
user.super_user = false;