Skip to content

Firefly III: a personal finances manager

Full coverage for user controller.

James Cole0cbb50ae9d7c
diff --git a/app/controllers/UserController.php b/app/controllers/UserController.php
index 00840fb375..e1d3c29311 100644
--- a/app/controllers/UserController.php
+++ b/app/controllers/UserController.php
@@ -79,14 +79,9 @@ class UserController extends BaseController
//$user = $this->user->register(Input::all());
if ($user) {
- if (Config::get('auth.verify_mail') === true) {
- $email->sendVerificationMail($user);
+ $email->sendVerificationMail($user);
- return View::make('user.verification-pending');
- }
- $email->sendPasswordMail($user);
-
- return View::make('user.registered');
+ return View::make('user.verification-pending');
}
@@ -115,14 +110,9 @@ class UserController extends BaseController
return View::make('user.remindme');
}
- if (Config::get('auth.verify_reset') === true) {
- $email->sendResetVerification($user);
-
- return View::make('user.verification-pending');
- }
- $email->sendPasswordMail($user);
+ $email->sendResetVerification($user);
- return View::make('user.registered');
+ return View::make('user.verification-pending');
}
diff --git a/tests/functional/UserControllerCest.php b/tests/functional/UserControllerCest.php
index 62d58c9833..53281b5536 100644
--- a/tests/functional/UserControllerCest.php
+++ b/tests/functional/UserControllerCest.php
@@ -68,7 +68,7 @@ class UserControllerCest
$I->wantTo('post-register a new account');
$I->amOnPage('/register');
$I->submitForm('#register', ['email' => '[email protected]']);
- $I->see('Password sent!');
+ $I->see('You\'re about to get an e-mail. Please follow its instructions.');
$I->seeRecord('users', ['email' => '[email protected]']);
}