mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add email registration restriction (#2350)
* Add ability to limit number of account registrations with same email address This commit adds server side functionality that will allow operators to limit the number of accounts that can be registered to the server with the same email address. * Updated ini wording Updated configuration file wording for better description.
This commit is contained in:
parent
3e39432ccc
commit
a85b0dcbba
8 changed files with 37 additions and 2 deletions
|
|
@ -242,6 +242,7 @@ bool Servatrice::initServer()
|
|||
if (getRegistrationEnabled()) {
|
||||
qDebug() << "Require email address to register: " << getRequireEmailForRegistrationEnabled();
|
||||
qDebug() << "Require email activation via token: " << getRequireEmailActivationEnabled();
|
||||
if (getMaxAccountsPerEmail()) { qDebug() << "Maximum number of accounts per email: " << getMaxAccountsPerEmail(); } else { qDebug() << "Maximum number of accounts per email: unlimited"; }
|
||||
qDebug() << "Enable Internal SMTP Client: " << getEnableInternalSMTPClient();
|
||||
if (!getEnableInternalSMTPClient())
|
||||
{
|
||||
|
|
@ -836,6 +837,10 @@ bool Servatrice::getEnableLogQuery() const {
|
|||
return settingsCache->value("logging/enablelogquery", false).toBool();
|
||||
}
|
||||
|
||||
int Servatrice::getMaxAccountsPerEmail() const {
|
||||
return settingsCache->value("registration/maxaccountsperemail", 0).toInt();
|
||||
}
|
||||
|
||||
bool Servatrice::getEnableInternalSMTPClient() const {
|
||||
return settingsCache->value("smtp/enableinternalsmtpclient", true).toBool();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue