Fix Model Policies from matching user_id's and account_id's, and other minor cosmetic fixes
This commit is contained in:
@@ -330,14 +330,14 @@ class User extends Authenticatable
|
||||
/* GENERAL METHODS */
|
||||
|
||||
/**
|
||||
* Determine if the user is an admin of the account with $id
|
||||
* Determine if the user is an admin of the user with $id
|
||||
*
|
||||
* @param $id
|
||||
* @return bool
|
||||
*/
|
||||
public function isAdmin($id): bool
|
||||
{
|
||||
return $id AND $this->isReseller() AND in_array($id,$this->all_accounts()->pluck('id')->toArray());
|
||||
return $id AND $this->isReseller() AND in_array($id,$this->all_accounts()->pluck('user_id')->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user