Update leenooks/laravel and framework updates
This commit is contained in:
@@ -266,12 +266,12 @@ class User extends Authenticatable implements IDs
|
||||
/**
|
||||
* Determine if the user is an admin of the user with $id
|
||||
*
|
||||
* @param $id
|
||||
* @param User|null $user
|
||||
* @return bool
|
||||
*/
|
||||
public function isAdmin($id): bool
|
||||
public function isAdmin(User $user=NULL): bool
|
||||
{
|
||||
return $id AND $this->isReseller() AND $this->accounts->pluck('user_id')->contains($id);
|
||||
return $user->exists AND $this->isReseller() AND $this->accounts->pluck('user_id')->contains($user->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user