From 4d3f20f4a7182033a6a1a7ef94d065adbfe35586 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 d0f573286..f8904b9d4 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -566,7 +566,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;