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]);
 }
 /**
  * Finds the Activity model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Activity the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Activity::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }