From 328a5bbbfb693c16e11e203ac98445e2a449c2d8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 17 Oct 2020 15:48:12 +0200 Subject: [PATCH] [users] Don't allow continuing with an empty login name The status for an empty login name is '' (empty), for ok -- this is so that there is no complaint about it. But it's not ok to continue with an empty name. --- src/modules/users/Config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index 024661d8d..1216b22a2 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -582,7 +582,7 @@ Config::isReady() const { bool readyFullName = !fullName().isEmpty(); // Needs some text bool readyHostname = hostNameStatus().isEmpty(); // .. no warning message - bool readyUsername = loginNameStatus().isEmpty(); // .. no warning message + bool readyUsername = !loginName().isEmpty() && loginNameStatus().isEmpty(); // .. no warning message bool readyUserPassword = userPasswordValidity() != Config::PasswordValidity::Invalid; bool readyRootPassword = rootPasswordValidity() != Config::PasswordValidity::Invalid; return readyFullName && readyHostname && readyUsername && readyUserPassword && readyRootPassword;