get('isActive'); } public function isAdmin(): bool { return $this->get('type') === 'admin' || $this->isSystem() || $this->isSuperAdmin(); } public function isPortal(): bool { return $this->get('type') === 'portal'; } public function isPortalUser(): bool { return $this->isPortal(); } public function isRegular(): bool { return $this->get('type') === 'regular' || ($this->has('type') && !$this->get('type')); } public function isApi(): bool { return $this->get('type') === 'api'; } public function isSystem(): bool { return $this->get('type') === 'system'; } public function isSuperAdmin(): bool { return $this->get('type') === 'super-admin'; } public function getTeamIdList(): array { return $this->getLinkMultipleIdList('teams'); } public function loadAccountField() { if ($this->get('contactId')) { $contact = $this->getEntityManager()->getEntity('Contact', $this->get('contactId')); if ($contact && $contact->get('accountId')) { $this->set('accountId', $contact->get('accountId')); $this->set('accountName', $contact->get('accountName')); } } } protected function _getName() { if (!$this->hasInContainer('name') || !$this->getFromContainer('name')) { if ($this->get('userName')) { return $this->get('userName'); } } return $this->getFromContainer('name'); } protected function _hasName() { if ($this->hasInContainer('name')) { return true; } if ($this->has('userName')) { return true; } return false; } }