You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2023. It is now read-only.
In my ldap_auth.php I have some (as an example) sync_attributes => ['email'=>'mail', 'address' => 'streetaddress' ],
which use to work just fine when doing php artisan adldap:import to get my users table populated. If a user did NOT have an email or address it would leave a NULL for that field in the database.
After updating to Adldap2-Laravel 5.0.0, if the email or address was NULL it now puts in the string 'mail' for email or 'streetaddress' for address in my database if the LDAP field is NULL. Any idea what is going on?
For now a work around I've used is ... in my 'sync_attributes' => ['email => ('mail' == 'mail') ? NULL : 'mail'] and so on for every field in sync_attributes that can contain a NULL.
The text was updated successfully, but these errors were encountered:
This was added to allow the use of raw values (such as booleans, integers and strings) during a sync. If the value on the LDAP users model is null, (as you described) then the true value is used.
For example, you can set a user attribute on your Eloquent model named from_ad to indicate if the user has been synchronized from ActiveDirectory:
To resolve this issue right now, you can use an Attribute Handler, but this is something I want to patch. I'm unsure how I could handle both situations with how the sync attribute array is currently set up.
In my ldap_auth.php I have some (as an example)
sync_attributes => ['email'=>'mail', 'address' => 'streetaddress' ]
,which use to work just fine when doing
php artisan adldap:import
to get my users table populated. If a user did NOT have an email or address it would leave a NULL for that field in the database.After updating to Adldap2-Laravel 5.0.0, if the email or address was NULL it now puts in the string 'mail' for email or 'streetaddress' for address in my database if the LDAP field is NULL. Any idea what is going on?
For now a work around I've used is ... in my
'sync_attributes' => ['email => ('mail' == 'mail') ? NULL : 'mail']
and so on for every field in sync_attributes that can contain a NULL.The text was updated successfully, but these errors were encountered: