Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xutl committed Oct 19, 2017
1 parent 7d85575 commit 27dcbdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ install:
before_script:
- mysql -e 'create database yuncms_test;'
- php tests/_app/yii.php migrate --interactive=0
- ~/.composer/vendor/bin/codecept build
- ~/vendor/bin/codecept build

script: ~/.composer/vendor/bin/codecept run
script: ~/vendor/bin/codecept run
5 changes: 4 additions & 1 deletion models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,10 @@ public function create()
if ($this->getIsNewRecord() == false) {
throw new \RuntimeException('Calling "' . __CLASS__ . '::' . __METHOD__ . '" on existing user');
}
$this->email_confirmed_at = time();
if ($this->scenario == self::SCENARIO_CREATE_MOBILE) {
$this->mobile_confirmed_at = time();
}

$this->password = $this->password == null ? Password::generate(8) : $this->password;
$this->trigger(self::BEFORE_CREATE);
if (!$this->save()) {
Expand Down

0 comments on commit 27dcbdf

Please sign in to comment.