Example #1
0
 public function register()
 {
     if (!$this->validate()) {
         return false;
     }
     $this->user->setAttributes(['email' => $this->email, 'username' => $this->username, 'password' => $this->password]);
     if ($this->user->register()) {
         // \Yii::getLogger()->log('User id is '.$this->user->id, Logger::LEVEL_INFO);
         if (NewUserSetup::CreateSsid($this->user->id)) {
             return true;
         }
     } else {
         return false;
     }
 }