mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Remove LDAP support.
This commit is contained in:
@@ -22,7 +22,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Auth;
|
||||
|
||||
use Adldap;
|
||||
use Cookie;
|
||||
use DB;
|
||||
use FireflyIII\Events\ActuallyLoggedIn;
|
||||
@@ -90,15 +89,6 @@ class LoginController extends Controller
|
||||
Log::channel('audit')->info(sprintf('User is trying to login using "%s"', $request->get($this->username())));
|
||||
Log::info('User is trying to login.');
|
||||
|
||||
$guard = config('auth.defaults.guard');
|
||||
|
||||
// if the user logs in using LDAP the field is also changed (per LDAP config)
|
||||
if ('ldap' === $guard) {
|
||||
Log::debug('User wishes to login using LDAP.');
|
||||
$this->username = config('firefly.ldap_auth_field');
|
||||
}
|
||||
|
||||
|
||||
$this->validateLogin($request);
|
||||
Log::debug('Login data is valid.');
|
||||
|
||||
@@ -216,17 +206,6 @@ class LoginController extends Controller
|
||||
return redirect(route('register'));
|
||||
}
|
||||
|
||||
// switch to LDAP settings:
|
||||
if ('ldap' === $guard) {
|
||||
Log::debug('User wishes to login using LDAP.');
|
||||
$this->username = config('firefly.ldap_auth_field');
|
||||
}
|
||||
|
||||
// throw warning if still using login_provider
|
||||
$ldapWarning = false;
|
||||
if ('ldap' === config('firefly.login_provider')) {
|
||||
$ldapWarning = true;
|
||||
}
|
||||
// is allowed to register, etc.
|
||||
$singleUserMode = app('fireflyconfig')->get('single_user_mode', config('firefly.configuration.single_user_mode'))->data;
|
||||
$allowRegistration = true;
|
||||
@@ -251,7 +230,7 @@ class LoginController extends Controller
|
||||
}
|
||||
$usernameField = $this->username();
|
||||
|
||||
return view('auth.login', compact('allowRegistration', 'email', 'remember', 'ldapWarning', 'allowReset', 'title', 'usernameField'));
|
||||
return view('auth.login', compact('allowRegistration', 'email', 'remember', 'allowReset', 'title', 'usernameField'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user