Exemplo n.º 1
0
 /**
  * Signs user up.
  *
  * @return User|null the saved model or null if saving fails
  */
 public function signup()
 {
     if ($this->validate()) {
         $rush = new Rush();
         $rush->firstname = $this->firstname;
         //             $rush->email = $this->email;
         //             $rush->setPassword($this->password);
         //             $rush->generateAuthKey();
         $rush->save();
         if ($rush->save()) {
             return $rush;
         }
     }
     return null;
 }
Exemplo n.º 2
0
 /**
  * Displays homepage.
  *
  * @return mixed
  */
 public function actionIndex()
 {
     $rush_reg_form = new RushSignupForm();
     $brian = Rush::findOne(1);
     return $this->render('index', ['rushRegistrationForm' => $rush_reg_form, 'brian' => $brian]);
 }