Set the user's id after creation.

This commit is contained in:
Relintai 2022-07-23 20:32:42 +02:00
parent 40df361d7c
commit d0c99d0ef6
3 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,7 @@ Ref<User> UserManagerFile::_create_user() {
Ref<User> u;
u.instance();
u->set_user_id(_users.size());
u->connect("changed", this, "_on_user_changed");
_users.push_back(u);

View File

@ -27,6 +27,8 @@ Ref<User> UserManagerStatic::_create_user() {
Ref<User> u;
u.instance();
u->set_user_id(_users.size());
_users.push_back(u);
return u;

View File

@ -53,6 +53,7 @@ Ref<User> UserDB::create_user() {
user.instance();
_lock.write_lock();
user->set_user_id(_users.size());
_users.push_back(user);
_lock.write_unlock();