Undefined constant "LdapRecord\Models\Attributes\LDAP_ESCAPE_FILTER" #543
-
I am trying to set up LdapRecord for login into MS AD. After entering AD userid and password I get the following error message: Where should I look to solve this? Where is this escape filter used? In .env I have the following LDAP-settings: LDAP_HOST='<ldap domain name>'
LDAP_USERNAME='cn=user,dc=foo,dc=no'
LDAP_PASSWORD='<password>'
LDAP_PORT=<LDAP-port>
LDAP_BASE_DN='ou=bar,dc=foo,dc=no'
LDAP_TIMEOUT=5
LDAP_SSL=true
LDAP_TLS=false In 'guards' => [
'web' => [
'driver' => 'session',
//'provider' => 'users',
'provider' => 'ldap',
],
], Changed providers to: 'providers' => [
'ldap' => [
'driver' => 'ldap',
'model' => LdapRecord\Models\ActiveDirectory\User::class,
'database' => [
'model' => App\Models\User::class,
'sync_passwords' => false,
'sync_attributes' => [
'name' => 'cn',
'email' => 'mail',
'userid' => 'samaccountname',
],
],
],
], In Fortify::authenticateUsing(function ($request) {
$validated = Auth::validate([
'samaccountname' => $request->userid,
'password' => $request->password,
'fallback' => [
'userid' => $request->userid,
'password' => $request->password,
],
]);
return $validated ? Auth::getLastAttempted() : null;
}); In |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @acharseth, This exception means that your PHP installation that your server is using does not have the PHP LDAP extension enabled. |
Beta Was this translation helpful? Give feedback.
Hi @acharseth,
This exception means that your PHP installation that your server is using does not have the PHP LDAP extension enabled.