public function save($useMasterKey = false) { if (!$this->getACL()) { throw new ParseException("Roles must have an ACL."); } if (!$this->getName() || !is_string($this->getName())) { throw new ParseException("Roles must have a name."); } return parent::save($useMasterKey); }
/** * Save the current user object, unless it is not signed up. * * @throws ParseException * * @return null */ public function save($useMasterKey = false) { if ($this->getObjectId()) { parent::save($useMasterKey); } else { throw new ParseException("You must call signUp to create a new User."); } }