mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update expiry email to show pending role. if there is one
This commit is contained in:
+10
-1
@@ -109,6 +109,7 @@ use Spatie\Permission\Traits\HasRoles;
|
||||
* @property-read Collection<int, UserRoleHistory> $roleHistory
|
||||
* @property-read Collection<int, Passkey> $passkeys
|
||||
* @property-read Role|null $role
|
||||
* @property-read Role|null $pendingRole
|
||||
* @property-read PasswordSecurity|null $passwordSecurity
|
||||
*
|
||||
* @method static Builder|User whereUsername(string $value)
|
||||
@@ -228,6 +229,14 @@ final class User extends Authenticatable implements HasPasskeys, MustVerifyEmail
|
||||
return $this->belongsTo(Role::class, 'roles_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<Role, $this>
|
||||
*/
|
||||
public function pendingRole(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Role::class, 'pending_roles_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<UserRequest, $this>
|
||||
*/
|
||||
@@ -649,7 +658,7 @@ final class User extends Authenticatable implements HasPasskeys, MustVerifyEmail
|
||||
return null;
|
||||
}
|
||||
|
||||
return Role::find($this->pending_roles_id);
|
||||
return $this->pendingRole;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user