diff --git a/modules/users/managers/user_manager_file.cpp b/modules/users/managers/user_manager_file.cpp index f5d7ed494..0ec20cb12 100644 --- a/modules/users/managers/user_manager_file.cpp +++ b/modules/users/managers/user_manager_file.cpp @@ -58,7 +58,7 @@ Ref UserManagerFile::_create_user() { Ref u; u.instance(); - + u->set_user_id(_users.size()); u->connect("changed", this, "_on_user_changed"); _users.push_back(u); diff --git a/modules/users/managers/user_manager_static.cpp b/modules/users/managers/user_manager_static.cpp index 9ae5dfd86..de2d915a9 100644 --- a/modules/users/managers/user_manager_static.cpp +++ b/modules/users/managers/user_manager_static.cpp @@ -27,6 +27,8 @@ Ref UserManagerStatic::_create_user() { Ref u; u.instance(); + u->set_user_id(_users.size()); + _users.push_back(u); return u; diff --git a/modules/users/singleton/user_db.cpp b/modules/users/singleton/user_db.cpp index 25895da80..e16c4bdd5 100644 --- a/modules/users/singleton/user_db.cpp +++ b/modules/users/singleton/user_db.cpp @@ -53,6 +53,7 @@ Ref UserDB::create_user() { user.instance(); _lock.write_lock(); + user->set_user_id(_users.size()); _users.push_back(user); _lock.write_unlock();