How to get server controls #378
-
Hi! Is there any way to check if the server has returned a control? I have to check for LDAPPasswordExpiringControl presence and I can't find any reference in the API docs. What I'm trying to do is the same as described in PHP manual on LDAP controls examples. The code I use is similar to this:
It works with vanilla PHP when the server returns the LDAPPasswordExpiringControl (OID = "2.16.840.1.113730.3.4.5"), but I can't figure how to do it the LdapRecord way. I'm currently making a double bind, one with LdapRecord and another one with a code similiar to the shown above in order to get the result. Any help would be appreciated. Thank you. Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @pafernandez-oesia, unfortunately this isn't possible in the LdapRecord API right now due to LdapRecord using You'd have to implement your own implementation of the I'll create an issue for this and patch this in so you can parse the bind result 👍 |
Beta Was this translation helpful? Give feedback.
Hi @pafernandez-oesia, unfortunately this isn't possible in the LdapRecord API right now due to LdapRecord using
ldap_bind()
(returnsbool
) instead ofldap_bind_ext()
(returnsLdapResult|false
).You'd have to implement your own implementation of the
LdapRecord\Ldap
class and add that method manually.I'll create an issue for this and patch this in so you can parse the bind result 👍