mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 19:50:40 -05:00
update: transaction controller
- Like the logic for sending invites. If invites are in restricted mode, dont allow a non whitelisted group to buy invites from the store.
This commit is contained in:
@@ -100,6 +100,10 @@ class TransactionController extends Controller
|
||||
|
||||
break;
|
||||
case $bonExchange->invite:
|
||||
if (config('other.invites_restriced') && !\in_array($user->group->name, config('other.invite_groups'), true)) {
|
||||
return back()->withErrors(trans('user.invites-disabled-group'));
|
||||
}
|
||||
|
||||
if ($user->invites >= config('other.max_unused_user_invites', 1)) {
|
||||
return back()->withErrors('You already have the maximum amount of unused invites allowed per user.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user