예제 #1
0
 public function beforeSave($insert)
 {
     if (parent::beforeSave($insert)) {
         if ($this->scenario == self::SCENARIO_PASSWORD_CHANGE) {
             $this->setPassword($this->passwordNew);
         }
         return true;
     } else {
         return false;
     }
 }
예제 #2
0
 public function beforeSave($insert)
 {
     if (parent::beforeSave($insert)) {
         //			$this->start = DDateTimeHelper::DateToUnix($this->date_from, $this->time_from);
         //			$this->end = DDateTimeHelper::DateToUnix($this->date_to, $this->time_to);
         //echo'<pre>';print_r($this);echo'</pre>';die;
         return true;
     } else {
         return false;
     }
 }
예제 #3
0
파일: User.php 프로젝트: wuwenhan/huoqiwang
 /**
  * @inheritdoc
  */
 public function beforeSave($insert)
 {
     if (parent::beforeSave($insert)) {
         if ($this->isNewRecord || !$this->isNewRecord && $this->password) {
             $this->setPassword($this->password);
             $this->generateAuthKey();
             $this->generatePasswordResetToken();
         }
         return true;
     }
     return false;
 }
예제 #4
0
파일: User.php 프로젝트: kvazarum/prereg
 public function beforeSave($insert)
 {
     if ($insert) {
         //                $this->addEventLog(EventLog::ACTION_ADD_ORDER);
     } else {
         $old = $this->getOldAttributes();
         $new = $this->getAttributes();
         $this->attributes_diff = array_diff_assoc($new, $old);
     }
     return parent::beforeSave($insert);
 }