Publish username rules in login failure, too

This commit is contained in:
Fabio Bas
2015-06-30 18:44:40 +02:00
parent 4c27304047
commit 02dcaff356
4 changed files with 48 additions and 36 deletions

View File

@@ -247,8 +247,7 @@ AuthenticationResult Servatrice_DatabaseInterface::checkUserPassword(Server_Prot
if (!checkSql())
return UnknownUser;
QString error;
if (!usernameIsValid(user, error))
if (!usernameIsValid(user, reasonStr))
return UsernameInvalid;
if (checkUserIsBanned(handler->getAddress(), user, reasonStr, banSecondsLeft))