Ejemplo n.º 1
0
 /**
  * This method tells if the user is an admin or not.
  * @param bool $alsoVerifyIfMaster If set to <b>true</b> (default), will also return true if the 
  * user is not an admin, but a master.
  * @return bool True for yes, false for no.
  */
 public function isAdmin($alsoVerifyIfMaster = true)
 {
     return parent::isAdmin($alsoVerifyIfMaster);
 }
Ejemplo n.º 2
0
 public function isAdmin($id = null, $alsoVerifyIfIsMaster = true)
 {
     if (is_null($id)) {
         return parent::isAdmin();
     }
     $admins = $this->getAdmins($alsoVerifyIfIsMaster);
     if ($admins == '*') {
         return true;
     }
     return in_array($id, $admins);
 }