1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Added check that custom_gateway is the correct id in table

This commit is contained in:
Hillel Coren 2017-03-27 13:02:02 +03:00
parent baf76a460d
commit 16750e83c2
2 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use App\Events\UserLoggedIn;
use App\Events\UserSignedUp;
use App\Libraries\HistoryUtils;
use App\Ninja\Repositories\AccountRepository;
use Utils;
use Auth;
use Carbon;
use Session;
@ -65,5 +66,10 @@ class HandleUserLoggedIn
} elseif ($account->isLogoTooLarge()) {
Session::flash('warning', trans('texts.logo_too_large', ['size' => $account->getLogoSize() . 'KB']));
}
// check custom gateway id is correct
if (! Utils::isNinja() && Gateway::find(GATEWAY_CUSTOM)->name !== 'Custom') {
Session::flash('error', trans('texts.error_incorrect_gateway_ids'));
}
}
}

View File

@ -2447,6 +2447,7 @@ $LANG = array(
'credit_number' => 'Credit Number',
'create_credit_note' => 'Create Credit Note',
'menu' => 'Menu',
'error_incorrect_gateway_ids' => 'Error: The gateways table has incorrect ids.',
);