Skip to content

Commit

Permalink
Changing the language from "AntiRegesterationSpam" to "PendingRegistr…
Browse files Browse the repository at this point in the history
…ation"

Co-Authored-By: Everade <[email protected]>
  • Loading branch information
sader1992 and Everade committed Mar 16, 2024
1 parent 16ca00e commit 77efc54
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
'RequireEmailConfirm' => false, // Require e-mail confirmation during registration.
'RequireChangeConfirm' => false, // Require confirmation when changing e-mail addresses.
'EmailConfirmExpire' => 48, // E-mail confirmations expire hours. Unconfirmed accounts will expire after this period of time.
'AntiRegesterationSpam' => false, // Work only when 'RequireEmailConfirm' is active , if the ip have an unconfirmed account , it would privent the user from registering new account.
'PendingRegistration' => false, // Requires 'RequireEmailConfirm' to be true. Prevents new registration if ip address has a pending registration on selected mail.
'PincodeEnabled' => true, // Whether or not the pincode system is enabled in your server. (Check your char_athena.conf file. Enabled by default.)
'MailerFromAddress' => 'noreply@localhost', // The e-mail address displayed in the From field.
'MailerFromName' => 'MailerName', // The name displayed with the From e-mail address.
Expand Down
2 changes: 1 addition & 1 deletion lang/en_us.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
'InvalidSecurityCode' => 'Please enter the security code correctly.',
'InvalidPassword' => 'Your password contains invalid characters.',
'InvalidBirthdate' => 'Invalid birthdate input.',
'AntiRegesterationSpam' => 'Anti Registeration Spam System is Active , Contact the Admin to Complete your registeration.',
'PendingRegistration' => 'You already have a pending registration. Please check your mails and follow the confirmation process.',
'CriticalRegisterError' => 'Something bad happened. Report to an administrator ASAP.',
// - account/edit
'AccountEditTitle' => 'Modify Account',
Expand Down
4 changes: 2 additions & 2 deletions lib/Flux/LoginServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ public function register($username, $password, $confirmPassword, $email,$email2,
}
}

if (Flux::config('RequireEmailConfirm') && Flux::config('AntiRegesterationSpam')) {
if (Flux::config('RequireEmailConfirm') && Flux::config('PendingRegistration')) {
$sql = "SELECT state FROM {$this->loginDatabase}.login WHERE last_ip = ? And state = 5 LIMIT 1";
$sth = $this->connection->getStatement($sql);
$sth->execute(array($_SERVER['REMOTE_ADDR']));

$res = $sth->fetch();
if ($res) {
throw new Flux_RegisterError('Anti Regesteration Spam System Detect a Spam', Flux_RegisterError::ANTI_REGESTERATION_SPAM);
throw new Flux_RegisterError('Detected pending registration. A new registration has been prevented.', Flux_RegisterError::PENDING_REGISTRATION);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Flux/RegisterError.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ class Flux_RegisterError extends Flux_Error {
const INVALID_PASSWORD = 18;
const INVALID_BIRTHDATE = 19;
const INVALID_EMAIL_CONF = 20;
const ANTI_REGESTERATION_SPAM= 21;
const PENDING_REGISTRATION = 21;
}
?>
4 changes: 2 additions & 2 deletions modules/account/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
case Flux_RegisterError::INVALID_BIRTHDATE:
$errorMessage = Flux::message('InvalidBirthdate');
break;
case Flux_RegisterError::ANTI_REGESTERATION_SPAM:
$errorMessage = Flux::message('AntiRegesterationSpam');
case Flux_RegisterError::PENDING_REGISTRATION:
$errorMessage = Flux::message('PendingRegistration');
break;
default:
$errorMessage = Flux::message('CriticalRegisterError');
Expand Down

0 comments on commit 77efc54

Please sign in to comment.