public function setCreator($creator) { $this->__load(); return parent::setCreator($creator); }
/** * * @param IXP_Form_Contact $form The form object * @param \Entities\Contact $object The Doctrine2 entity (being edited or blank for add) * @param bool $isEdit True of we are editing an object, false otherwise * @return bool If false, the form is not processed */ protected function addPostValidate($form, $object, $isEdit) { if ($this->getUser()->getPrivs() == \Entities\User::AUTH_SUPERUSER) { $object->setCustomer($this->getD2R('\\Entities\\Customer')->find($form->getElement('custid')->getValue())); } else { $object->setCustomer($this->getUser()->getCustomer()); } if (!$isEdit) { $object->setCreated(new DateTime()); $object->setCreator($this->getUser()->getUsername()); } $object->setLastupdated(new DateTime()); $object->setLastupdatedby($this->getUser()->getId()); if (!$this->_processUser($form, $object, $isEdit)) { return false; } // let the group processor have the final say as to whether post validation // passes or not return $this->_setContactGroups($form, $object); }