diff --git a/src/storage/storage_users.cpp b/src/storage/storage_users.cpp index 3b9b334..14b1b31 100644 --- a/src/storage/storage_users.cpp +++ b/src/storage/storage_users.cpp @@ -131,8 +131,10 @@ namespace OpenWifi { if(!Records.empty()) return false; - NewUser.Id = MicroService::instance().CreateUUID(); - NewUser.creationDate = std::time(nullptr); + if(!PasswordHashedAlready) { + NewUser.Id = MicroService::instance().CreateUUID(); + NewUser.creationDate = std::time(nullptr); + } // if there is a password, we assume that we do not want email verification, // if there is no password, we will do email verification