Improved login error message

This commit is contained in:
Fabio Bas
2015-12-11 18:23:34 +01:00
parent a6ff54ae0e
commit beecc0f970
5 changed files with 17 additions and 2 deletions

View File

@@ -176,7 +176,8 @@ bool Servatrice::initServer()
bool registrationEnabled = settingsCache->value("registration/enabled", false).toBool();
bool requireEmailForRegistration = settingsCache->value("registration/requireemail", true).toBool();
qDebug() << "Registration enabled: " << regServerOnly;
qDebug() << "Accept registered users only: " << regServerOnly;
qDebug() << "Registration enabled: " << registrationEnabled;
if (registrationEnabled)
qDebug() << "Require email address to register: " << requireEmailForRegistration;

View File

@@ -124,6 +124,8 @@ bool Servatrice_DatabaseInterface::execSqlQuery(QSqlQuery *query)
bool Servatrice_DatabaseInterface::usernameIsValid(const QString &user, QString & error)
{
int minNameLength = settingsCache->value("users/minnamelength", 6).toInt();
if(minNameLength < 1)
minNameLength = 1;
int maxNameLength = settingsCache->value("users/maxnamelength", 12).toInt();
bool allowLowercase = settingsCache->value("users/allowlowercase", true).toBool();
bool allowUppercase = settingsCache->value("users/allowuppercase", true).toBool();