Optimise queries for rendering the about page
This commit is contained in:
@@ -139,10 +139,16 @@ class Domain extends Model
|
||||
->get();
|
||||
}
|
||||
|
||||
public function isManaged(): bool
|
||||
{
|
||||
return our_address()->pluck('zone.domain')->pluck('id')->contains($this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this zone is managed by this host
|
||||
*
|
||||
* @return bool
|
||||
* @deprecated use self::isManaged();
|
||||
*/
|
||||
public function managed(): bool
|
||||
{
|
||||
|
@@ -84,7 +84,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* See if the user is already a member of the chosen network
|
||||
*
|
||||
@@ -103,6 +102,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
*/
|
||||
public function isZC(): bool
|
||||
{
|
||||
$this->load(['systems.addresses']);
|
||||
return $this->zc()->count() > 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user