Invites: Permanent invites feature (#1670)

* Invites: Permanent invites feature

* Update config.php

* Update config.php

* Update CHANGELOG.md

* Update config.php
This commit is contained in:
Roman Kelesidis 2024-11-05 00:06:09 +07:00 committed by GitHub
commit d9a8adbaaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View file

@ -207,8 +207,10 @@ foreach ($profile_fields as $field => $can_edit) {
$invite_code = $_POST['invite_code'] ?? '';
if ($submit) {
if (isset($bb_cfg['invites_system']['codes'][$invite_code])) {
if (TIMENOW > strtotime($bb_cfg['invites_system']['codes'][$invite_code])) {
$errors[] = $lang['INVITE_EXPIRED'];
if ($bb_cfg['invites_system']['codes'][$invite_code] !== 'permanent') {
if (TIMENOW > strtotime($bb_cfg['invites_system']['codes'][$invite_code])) {
$errors[] = $lang['INVITE_EXPIRED'];
}
}
} else {
$errors[] = $lang['INCORRECT_INVITE'];