Invites config re-formatting (#1162)

* Invites config re-formatting

* Update config.php

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-11-23 09:15:06 +07:00 committed by GitHub
commit 33b2042395
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 20 deletions

View file

@ -203,15 +203,14 @@ foreach ($profile_fields as $field => $can_edit) {
* Invite code (reg)
*/
case 'invite_code':
if ($bb_cfg['invite_only']) {
if ($bb_cfg['invites_system']['enabled']) {
$invite_code = $_POST['invite_code'] ?? '';
if ($submit) {
if (isset($bb_cfg['invite_codes'][$invite_code])) {
if (TIMENOW > strtotime($bb_cfg['invite_codes'][$invite_code])) {
if (isset($bb_cfg['invites_system']['codes'][$invite_code])) {
if (TIMENOW > strtotime($bb_cfg['invites_system']['codes'][$invite_code])) {
$errors[] = $lang['INVITE_EXPIRED'];
}
}
else {
} else {
$errors[] = $lang['INCORRECT_INVITE'];
}
}