mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Refactor models.
This commit is contained in:
@@ -36,6 +36,7 @@ class InvitedUser extends Model
|
||||
{
|
||||
use ReturnsIntegerIdTrait;
|
||||
use ReturnsIntegerUserIdTrait;
|
||||
|
||||
protected $fillable = ['user_group_id', 'user_id', 'email', 'invite_code', 'expires', 'expires_tz', 'redeemed'];
|
||||
|
||||
/**
|
||||
@@ -44,10 +45,10 @@ class InvitedUser extends Model
|
||||
public static function routeBinder(string $value): self
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$attemptId = (int) $value;
|
||||
$attemptId = (int)$value;
|
||||
|
||||
/** @var null|InvitedUser $attempt */
|
||||
$attempt = self::find($attemptId);
|
||||
$attempt = self::find($attemptId);
|
||||
if (null !== $attempt) {
|
||||
return $attempt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user