Systems update

This commit is contained in:
Andrew nuark G 2020-12-22 22:17:29 +07:00
parent 09e67d4031
commit 72a4842800
2 changed files with 1 additions and 6 deletions

View file

@ -59,7 +59,7 @@ void apparatus::load() {
QDataStream stream(&f);
// loading GIDs
entity_id vgid, sgid;
entity_id vgid, sgid = vgid = 0;
stream >> vgid >> sgid;
vessel_entity::preloadGlobalId(vgid);
storage_entity::preloadGlobalId(sgid);

View file

@ -1,6 +1,5 @@
#include "apparatus.h"
#include "auth_system.h"
#include <iostream>
const user_entity* auth_system::get_user(const QString &login, bool &success) {
@ -34,11 +33,7 @@ bool auth_system::register_user(const QString &login, const QString &password, U
bool exists = false;
this->get_user(login, exists);
if (!exists) {
std::cout << apparatus::instance()->get_auth_subsystem()->users().length() << std::endl;
this->_users.push_back(user_entity(login, password, role));
std::cout << apparatus::instance()->get_auth_subsystem()->users().length() << std::endl;
apparatus::instance()->save();
std::cout << apparatus::instance()->get_auth_subsystem()->users().length() << std::endl;
return true;
}