mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 06:43:23 +00:00
Fix view for transaction controller.
This commit is contained in:
@@ -228,7 +228,6 @@ class TransactionController extends Controller
|
|||||||
$what = strtolower($transactionType);
|
$what = strtolower($transactionType);
|
||||||
$subTitle = trans('firefly.' . $what) . ' "' . $journal->description . '"';
|
$subTitle = trans('firefly.' . $what) . ' "' . $journal->description . '"';
|
||||||
|
|
||||||
var_dump($transactions);exit;
|
|
||||||
return view('transactions.show', compact('journal', 'events', 'subTitle', 'what', 'transactions', 'linkTypes', 'links'));
|
return view('transactions.show', compact('journal', 'events', 'subTitle', 'what', 'transactions', 'linkTypes', 'links'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,8 +24,10 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Http\Middleware;
|
namespace FireflyIII\Http\Middleware;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use Illuminate\Auth\AuthenticationException;
|
use Illuminate\Auth\AuthenticationException;
|
||||||
use Illuminate\Contracts\Auth\Factory as Auth;
|
use Illuminate\Contracts\Auth\Factory as Auth;
|
||||||
|
use Illuminate\Database\QueryException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Authenticate
|
* Class Authenticate
|
||||||
@@ -76,24 +78,31 @@ class Authenticate
|
|||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws \Illuminate\Auth\AuthenticationException
|
* @throws \Illuminate\Auth\AuthenticationException
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
protected function authenticate(array $guards)
|
protected function authenticate(array $guards)
|
||||||
{
|
{
|
||||||
if (empty($guards)) {
|
|
||||||
// go for default guard:
|
|
||||||
if ($this->auth->check()) {
|
|
||||||
// do an extra check on user object.
|
|
||||||
$user = $this->auth->authenticate();
|
|
||||||
if (1 === (int)$user->blocked) {
|
|
||||||
$message = (string)trans('firefly.block_account_logout');
|
|
||||||
if ('email_changed' === $user->blocked_code) {
|
|
||||||
$message = (string)trans('firefly.email_changed_logout');
|
|
||||||
}
|
|
||||||
app('session')->flash('logoutMessage', $message);
|
|
||||||
$this->auth->logout();
|
|
||||||
|
|
||||||
throw new AuthenticationException('Blocked account.', $guards);
|
if (empty($guards)) {
|
||||||
|
try {
|
||||||
|
// go for default guard:
|
||||||
|
if ($this->auth->check()) {
|
||||||
|
|
||||||
|
// do an extra check on user object.
|
||||||
|
$user = $this->auth->authenticate();
|
||||||
|
if (1 === (int)$user->blocked) {
|
||||||
|
$message = (string)trans('firefly.block_account_logout');
|
||||||
|
if ('email_changed' === $user->blocked_code) {
|
||||||
|
$message = (string)trans('firefly.email_changed_logout');
|
||||||
|
}
|
||||||
|
app('session')->flash('logoutMessage', $message);
|
||||||
|
$this->auth->logout();
|
||||||
|
|
||||||
|
throw new AuthenticationException('Blocked account.', $guards);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (QueryException $e) {
|
||||||
|
throw new FireflyException('It seems the database has not yet been initialized. Did you run the correct upgrade or installation commands?');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->auth->authenticate();
|
return $this->auth->authenticate();
|
||||||
|
Reference in New Issue
Block a user