Merge branch 'develop' into 5.8-dev

This commit is contained in:
James Cole
2022-10-01 19:06:55 +02:00
25 changed files with 367 additions and 122 deletions

View File

@@ -451,7 +451,7 @@ class UserRepository implements UserRepositoryInterface
public function validateInviteCode(string $code): bool
{
$now = Carbon::now();
$invitee = InvitedUser::where('invite_code', $code)->where('expires', '<=', $now)->where('redeemed', 0)->first();
$invitee = InvitedUser::where('invite_code', $code)->where('expires', '>', $now->format('Y-m-d H:i:s'))->where('redeemed', 0)->first();
return null !== $invitee;
}