mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 18:01:26 -06:00
Small layout change [skip ci]
This commit is contained in:
parent
768c7e53b4
commit
afe9d109b3
@ -2,8 +2,13 @@
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use FireflyConfig;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Cookie\CookieJar;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
@ -37,4 +42,28 @@ class LoginController extends Controller
|
||||
parent::__construct();
|
||||
$this->middleware('guest')->except('logout');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application's login form.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function showLoginForm(Request $request, CookieJar $cookieJar)
|
||||
{
|
||||
// forget 2fa cookie:
|
||||
$cookie = $cookieJar->forever('twoFactorAuthenticated', 'false');
|
||||
|
||||
// is allowed to?
|
||||
$singleUserMode = FireflyConfig::get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
|
||||
$userCount = User::count();
|
||||
$allowRegistration = true;
|
||||
if ($singleUserMode === true && $userCount > 0) {
|
||||
$allowRegistration = false;
|
||||
}
|
||||
|
||||
$email = $request->old('email');
|
||||
$remember = $request->old('remember');
|
||||
|
||||
return view('auth.login', compact('allowRegistration', 'email', 'remember'))->withCookie($cookie);
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,7 @@ class MailError extends Job implements ShouldQueue
|
||||
$this->destination = $destination;
|
||||
$this->ipAddress = $ipAddress;
|
||||
$this->exception = $exceptionData;
|
||||
|
||||
$debug = $exceptionData;
|
||||
$debug = $exceptionData;
|
||||
unset($debug['stackTrace']);
|
||||
Log::error('Exception is: ' . json_encode($debug));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user