Added Buildings
This commit is contained in:
@@ -74,9 +74,15 @@ class User extends mfBaseModel {
|
||||
}
|
||||
|
||||
public function is($what) {
|
||||
if(!$this->id) {
|
||||
return false;
|
||||
}
|
||||
if(is_object($this->permissions) && property_exists($this->permissions, "is$what")) {
|
||||
return $this->permissions->{"is$what"};
|
||||
}
|
||||
if(is_object($this->address) && property_exists($this->address, "types") && is_array($this->address->types)) {
|
||||
return ($this->address->types[$what]->id) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
public function isAdmin() {
|
||||
|
||||
Reference in New Issue
Block a user