Пример #1
0
 /**
  * Update record in database
  *
  * @return boolean
  */
 public function update()
 {
     return $this->checkAddress() && parent::update();
 }
Пример #2
0
 /**
  * Update an entity in the database
  *
  * @param boolean $cloneMode Clone mode OPTIONAL
  *
  * @return boolean
  */
 public function update($cloneMode = false)
 {
     // Check if user with specified e-mail address is already exists
     $exists = $cloneMode ? null : \XLite\Core\Database::getRepo('XLite\\Model\\Profile')->checkRegisteredUserWithSameLogin($this);
     if ($exists) {
         $this->addErrorEmailExists();
         $result = false;
     } else {
         // Do an entity update
         $result = parent::update();
     }
     return $result;
 }
Пример #3
0
 /**
  * Update an entity in the database
  *
  * @param boolean $cloneMode Clone mode OPTIONAL
  *
  * @return boolean
  */
 public function update($cloneMode = false)
 {
     // Check if user with specified e-mail address is already exists
     if (!$cloneMode) {
         $sameProfile = \XLite\Core\Database::getRepo('XLite\\Model\\Profile')->findUserWithSameLogin($this);
     }
     if (isset($sameProfile)) {
         $this->addErrorEmailExists();
         $result = false;
     } else {
         // Do an entity update
         $result = parent::update();
     }
     return $result;
 }