예제 #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;
 }