AdldapException: User.php line 1003 while trying to change password on FreeIPA #427
Description
- Laravel Version: 5.4
- Adldap2-Laravel Version: 3.0.4
- LDAP Type: FreeIPA
- PHP Version: 7.0
Description:
Steps To Reproduce:
Set up a Laravel project with the extension, then a LDAP binding with an admin account over TLS.
Now, create a controller for password operations. I used this code to get the user object:
$theUser = Adldap::search()->users()->where("uid", "=", Session::get("username"))->first();
(Not sure if this is relevant, but as a side-note, in FreeIPA, the full DN for a user will be something like "uid=foobar,cn=users,cn=accounts,dc=mydc,dc=example,dc=net")
var_dump()
shows that the user data comes up as expected. Then, the changePassword()
method is called on the object like this:
$theUser->changePassword($request->old_password, $request->new_password);
However, this causes an exception with no message. The only thing that the logger says is that there's an AdldapException on User.php line 1003.
I'm pretty sure this is probably a syntax issue (or something similar) somewhere, but after fiddling for a big while I still can't figure out why this won't work. Help would be much appreciated :)