diff --git a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/utilities/Validator.cpp b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/utilities/Validator.cpp index f56d660..e8968d9 100644 --- a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/utilities/Validator.cpp +++ b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/utilities/Validator.cpp @@ -116,15 +116,13 @@ bool util::isPasswordValid(const std::string& password) * usersMap - map of user objects keyed by identifier * Returns: * bool - true if the username is already in use by an active user, false otherwise - * Notes: - * - Only considers users with state util::State::ACTIVE */ bool util::isUsernameDuplicate(const std::string& username, const util::Map& usersMap) { int index = usersMap.findIf( [&](const std::string&, User* user) { - return (user->getUserName() == username && user->getState() == util::State::ACTIVE); + return (user->getUserName() == username); } ); return index != -1;