mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-28 11:53:11 -07:00
Improved login error message
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user