コード例 #1
0
 public function actionSignup()
 {
     $model = new SignupForm();
     if ($model->load(Yii::$app->request->post())) {
         if ($user = $model->signup()) {
             Yii::$app->getSession()->setFlash('success', Module::t('module', 'FLASH_EMAIL_CONFIRM_REQUEST'));
             return $this->goHome();
         }
     }
     return $this->render('signup', ['model' => $model]);
 }
コード例 #2
0
 public function actionSignup()
 {
     $model = new SignupForm();
     if ($model->load(Yii::$app->request->post())) {
         if ($user = $model->signup()) {
             Yii::$app->getSession()->setFlash('success', Yii::t('user/flash', 'Please confirm your Email'));
             return $this->goHome();
         }
     }
     return $this->render('signup', ['model' => $model]);
 }
コード例 #3
0
 public function actionSignup()
 {
     $this->layout = 'blank';
     $model = new SignupForm();
     $rules = Activity::findOne(['name' => 'rules']);
     if ($model->load(Yii::$app->request->post())) {
         if ($user = $model->signup()) {
             Yii::$app->session->setFlash('info', Module::t('app', 'SECURE_FLASH_SIGNUP_OK_EMAIL {email}', ['email' => $user->email]));
             return $this->goHome();
         }
     }
     return $this->render('signup', ['model' => $model, 'rules' => $rules]);
 }
コード例 #4
0
ファイル: SignupFormTest.php プロジェクト: cleverid/seokeys
 public function testNotCorrectSignup()
 {
     $model = new SignupForm(['username' => 'admin', 'email' => '*****@*****.**', 'password' => 'some_password', 'verifyCode' => 'testme']);
     expect('username and email are in use, user should not be created', $model->signup())->null();
 }