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
Describe the bug
This is possibly an isolated issue.
Earlier today I tried to configure LdapRecord-Laravel.
As soon as I tried to login with a user a TypeError exception was thrown with the following text: Argument 1 passed to LdapRecord\Models\Model::serializeDate() must implement interface DateTimeInterface, null given, called in C:\Users\bruno.martins\source\repos\outono\vendor\directorytree\ldaprecord\src\Models\Concerns\HasAttributes.php on line 105
Se screenshot below
To fix this I dug arround a bit and found that some of the user attributes, like 'lockouttime' and 'lastlogoff were set to "0", and when put throught the $this->asDateTime() were being returned as null.
Following my discovery I added a simple check, see below:
After this, I could login with a user and use the app, again, I do not know if this is an isolated issue or not, If it's not, I am more than happy to file a merge request and tweak the code for a fix.
Thanks!
To Reproduce
Steps to reproduce the behavior:
Create a new laravel project
Add this module
Configure according to the configuration documentation
Try Logging in
Expected behavior
The user is logged in and created in the database
Environment (please complete the following information):
LDAP Server Type: ActiveDirectory
PHP Version: 7.4
Laravel Version: 7.x
The text was updated successfully, but these errors were encountered:
I'm fixing this now -- however I'm trying to determine what timestamp values you both may have for the whencreated and whenchanged LDAP properties which is causing the failure of conversion?
stevebauman
added a commit
to DirectoryTree/LdapRecord
that referenced
this issue
Apr 16, 2020
Describe the bug
This is possibly an isolated issue.
Earlier today I tried to configure LdapRecord-Laravel.
As soon as I tried to login with a user a TypeError exception was thrown with the following text:
Argument 1 passed to LdapRecord\Models\Model::serializeDate() must implement interface DateTimeInterface, null given, called in C:\Users\bruno.martins\source\repos\outono\vendor\directorytree\ldaprecord\src\Models\Concerns\HasAttributes.php on line 105
Se screenshot below
To fix this I dug arround a bit and found that some of the user attributes, like 'lockouttime' and 'lastlogoff were set to "0", and when put throught the $this->asDateTime() were being returned as null.
Following my discovery I added a simple check, see below:
No fix:
Fix:
After this, I could login with a user and use the app, again, I do not know if this is an isolated issue or not, If it's not, I am more than happy to file a merge request and tweak the code for a fix.
Thanks!
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The user is logged in and created in the database
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: