From 03e1673e92c2f9e53c16f29e4eaae4e80ae06fd7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 1 Nov 2015 08:06:51 +0100 Subject: [PATCH] Fix login message. --- app/Http/Controllers/Auth/AuthController.php | 3 +++ resources/lang/en/firefly.php | 1 + resources/lang/nl/firefly.php | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index 603c6c3d3b..7caeb6b87d 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -89,6 +89,9 @@ class AuthController extends Controller if (!is_null($foundUser)) { // if it exists, show message: $code = $foundUser->blocked_code; + if(strlen($code) == 0) { + $code = 'general_blocked'; + } $message = trans('firefly.' . $code . '_error', ['email' => $credentials['email']]); } diff --git a/resources/lang/en/firefly.php b/resources/lang/en/firefly.php index de4886df8e..2c543fce80 100644 --- a/resources/lang/en/firefly.php +++ b/resources/lang/en/firefly.php @@ -22,6 +22,7 @@ return [ 'search_results_for' => 'Search results for ":query"', 'bounced_error' => 'The message sent to :email bounced, so no access for you.', 'deleted_error' => 'These credentials do not match our records.', + 'general_blocked_error' => 'Your account has been disabled, so you cannot login.', 'removed_amount' => 'Removed :amount', 'added_amount' => 'Added :amount', 'asset_account_role_help' => 'Any extra options resulting from your choice can be set later.', diff --git a/resources/lang/nl/firefly.php b/resources/lang/nl/firefly.php index 30749b773a..f8dbfa977e 100644 --- a/resources/lang/nl/firefly.php +++ b/resources/lang/nl/firefly.php @@ -21,7 +21,8 @@ return [ 'never' => 'Nooit', 'search_results_for' => 'Zoekresultaten voor ":query"', 'bounced_error' => 'Het emailtje naar :email kwam nooit aan.', - 'deleted_error' => 'These credentials do not match our records.', + 'deleted_error' => 'Deze gegevens zijn niet correct.', + 'general_blocked_error' => 'Je account is uitgeschakeld, je kan helaas niet inloggen.', 'removed_amount' => ':amount weggehaald', 'added_amount' => ':amount toegevoegd', 'asset_account_role_help' => 'Voorkeuren die voortkomen uit je keuze hier kan je later aangeven.',