Skip to content
Snippets Groups Projects
Commit 7f86bada authored by Peter Rotich's avatar Peter Rotich
Browse files

Add function to check if staff is a manager - take id or staff's object

parent fe72e750
Branches
Tags
No related merge requests found
...@@ -180,6 +180,14 @@ class Dept { ...@@ -180,6 +180,14 @@ class Dept {
return $this->manager; return $this->manager;
} }
function isManager($staff) {
if(is_object($staff)) $staff=$staff->getId();
return ($this->getManagerId() && $this->getManagerId()==$staff);
}
function isPublic() { function isPublic() {
return ($this->ht['ispublic']); return ($this->ht['ispublic']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment