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]); }
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]); }
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]); }
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(); }