frontend\controllers\SiteController::actionResetPassword PHP Method

actionResetPassword() public method

Resets password.
public actionResetPassword ( string $token ) : mixed
$token string
return mixed
    public function actionResetPassword($token)
    {
        try {
            $model = new ResetPasswordForm($token);
        } catch (InvalidParamException $e) {
            throw new BadRequestHttpException($e->getMessage());
        }
        if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->resetPassword()) {
            Yii::$app->session->setFlash('success', 'New password saved.');
            return $this->goHome();
        }
        return $this->render('resetPassword', ['model' => $model]);
    }