mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 20:25:28 +00:00
Code clean up.
This commit is contained in:
@@ -59,6 +59,5 @@ class ForgotPasswordController extends Controller
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware('guest');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Schema;
|
||||
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
/*
|
||||
@@ -85,16 +84,16 @@ class LoginController extends Controller
|
||||
// check for presence of tables:
|
||||
$hasTable = Schema::hasTable('users');
|
||||
|
||||
if(!$hasTable) {
|
||||
if (!$hasTable) {
|
||||
$message = 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
|
||||
return view('error',compact('message'));
|
||||
return view('error', compact('message'));
|
||||
}
|
||||
|
||||
// check for presence of currency:
|
||||
$currency = TransactionCurrency::where('code','EUR')->first();
|
||||
if(is_null($currency)) {
|
||||
$currency = TransactionCurrency::where('code', 'EUR')->first();
|
||||
if (is_null($currency)) {
|
||||
$message = 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
|
||||
return view('error',compact('message'));
|
||||
return view('error', compact('message'));
|
||||
}
|
||||
|
||||
// forget 2fa cookie:
|
||||
|
||||
@@ -158,7 +158,8 @@ class RegisterController extends Controller
|
||||
protected function validator(array $data)
|
||||
{
|
||||
return Validator::make(
|
||||
$data, [
|
||||
$data,
|
||||
[
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|secure_password|confirmed',
|
||||
]
|
||||
|
||||
@@ -49,7 +49,6 @@ class TwoFactorController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
$user = auth()->user();
|
||||
|
||||
// to make sure the validator in the next step gets the secret, we push it in session
|
||||
@@ -105,5 +104,4 @@ class TwoFactorController extends Controller
|
||||
|
||||
return redirect(route('home'))->withCookie($cookie);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user