/** * Enter description here... * */ public function save() { if (!$this->is_deleted) { $this->is_deleted = 0; if (M('Date')->dbDate($this->birthday) == M('Date')->dbDate('xxx') && $this->birthday != '1970-01-01') { $res = new RM_Base_Result(); $res->error('not_empty', 'birthday'); throw new RM_Validator_Exception($res); } } if (!$this->is_animal) { $this->is_animal = 0; } if (!$this->is_panelist) { $this->is_panelist = 0; } parent::save(); }
/** * Only super administrators can modify ssl certificate! * * @param string $name * @param mixed $value */ protected function __set($name, $value) { if ($name == 'ssl_number' && !me()->isUserInGroup('super-admin')) { return; } parent::__set($name, $value); }