| @@ 147-159 (lines=13) @@ | ||
| 144 | * Signup new user |
|
| 145 | * @return string |
|
| 146 | */ |
|
| 147 | public function actionSignup() |
|
| 148 | { |
|
| 149 | $model = new Signup(); |
|
| 150 | if ($model->load(Yii::$app->getRequest()->post())) { |
|
| 151 | if ($user = $model->signup()) { |
|
| 152 | return $this->goHome(); |
|
| 153 | } |
|
| 154 | } |
|
| 155 | ||
| 156 | return $this->render('signup', [ |
|
| 157 | 'model' => $model, |
|
| 158 | ]); |
|
| 159 | } |
|
| 160 | ||
| 161 | /** |
|
| 162 | * Request reset password |
|
| @@ 210-220 (lines=11) @@ | ||
| 207 | * Reset password |
|
| 208 | * @return string |
|
| 209 | */ |
|
| 210 | public function actionChangePassword() |
|
| 211 | { |
|
| 212 | $model = new ChangePassword(); |
|
| 213 | if ($model->load(Yii::$app->getRequest()->post()) && $model->change()) { |
|
| 214 | return $this->goHome(); |
|
| 215 | } |
|
| 216 | ||
| 217 | return $this->render('change-password', [ |
|
| 218 | 'model' => $model, |
|
| 219 | ]); |
|
| 220 | } |
|
| 221 | ||
| 222 | /** |
|
| 223 | * Activate new user |
|