File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class Ldap implements ConnectorInterface
2626 use LdapHelpers;
2727
2828 /**
29- * @var \Symfony\Component\Ldap\Adapter\ExtLdap\Adapter
29+ * @var \Symfony\Component\Ldap\Adapter
3030 */
3131 protected Adapter $ adapter ;
3232
@@ -81,6 +81,15 @@ public function __construct(
8181 }
8282
8383
84+ /**
85+ * @return \Symfony\Component\Ldap\Adapter
86+ */
87+ public function getAdapter (): Adapter
88+ {
89+ return $ this ->adapter ;
90+ }
91+
92+
8493 /**
8594 * @inheritDoc
8695 */
@@ -198,4 +207,20 @@ protected function resolveBindError(InvalidCredentialsException $e): string
198207 {
199208 return self ::ERR_WRONG_PASS ;
200209 }
210+
211+
212+ /**
213+ * @param \Symfony\Component\Ldap\Entry $entry
214+ * @return bool
215+ */
216+ public function updateEntry (Entry $ entry ): bool
217+ {
218+ try {
219+ $ this ->adapter ->getEntryManager ()->update ($ entry );
220+ return true ;
221+ } catch (LdapException $ e ) {
222+ Logger::warning ($ e ->getMessage ());
223+ return false ;
224+ }
225+ }
201226}
You can’t perform that action at this time.
0 commit comments