if ($current_invites > $max_invites) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Total invitation limit exceeded.'));
}
if ($current_invites > $max_invites) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Total invitation limit exceeded.'));
}
foreach ($recipients as $recipient) {
$recipient = trim($recipient);
if (!filter_var($recipient, FILTER_VALIDATE_EMAIL)) {
foreach ($recipients as $recipient) {
$recipient = trim($recipient);
if (!filter_var($recipient, FILTER_VALIDATE_EMAIL)) {
- DI::pConfig()->set(local_user(), 'system', 'invites_remaining', $invites_remaining);
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'invites_remaining', $invites_remaining);
- DI::pConfig()->set(local_user(), 'system', 'sent_invites', $current_invites);
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'sent_invites', $current_invites);
if ((!$x) && (!$app->isSiteAdmin())) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('You have no more invitations available'));
}
if ((!$x) && (!$app->isSiteAdmin())) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('You have no more invitations available'));
}