protected function readField($field) { switch ($field) { case 'timezoneIdentifier': // If the user hasn't set one, guess the server's time. return nonempty($this->timezoneIdentifier, date_default_timezone_get()); // Make sure these return booleans. // Make sure these return booleans. case 'isAdmin': return (bool) $this->isAdmin; case 'isDisabled': return (bool) $this->isDisabled; case 'isSystemAgent': return (bool) $this->isSystemAgent; default: return parent::readField($field); } }
protected function readField($field) { switch ($field) { // Make sure these return booleans. case 'isAdmin': return (bool) $this->isAdmin; case 'isDisabled': return (bool) $this->isDisabled; case 'isSystemAgent': return (bool) $this->isSystemAgent; case 'isMailingList': return (bool) $this->isMailingList; case 'isEmailVerified': return (bool) $this->isEmailVerified; case 'isApproved': return (bool) $this->isApproved; default: return parent::readField($field); } }
protected function readField($field) { switch ($field) { case 'profileImagePHID': return nonempty($this->profileImagePHID, PhabricatorEnv::getEnvConfig('user.default-profile-image-phid')); case 'timezoneIdentifier': // If the user hasn't set one, guess the server's time. return nonempty($this->timezoneIdentifier, date_default_timezone_get()); // Make sure these return booleans. // Make sure these return booleans. case 'isAdmin': return (bool) $this->isAdmin; case 'isDisabled': return (bool) $this->isDisabled; case 'isSystemAgent': return (bool) $this->isSystemAgent; default: return parent::readField($field); } }