1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/aeneria_ynh.git synced 2024-09-03 18:06:15 +02:00

fix ldap patch

This commit is contained in:
Simon Mellerin 2024-01-09 14:02:55 +01:00
parent 0dfeb7925f
commit adc2a721a4

View file

@ -64,7 +64,7 @@ new file mode 100755
index 00000000..eb8b1149
--- /dev/null
+++ b/src/Security/YnhLdapUserProvider.php
@@ -0,0 +1,79 @@
@@ -0,0 +1,89 @@
+<?php
+
+namespace App\Security;
@ -104,12 +104,21 @@ index 00000000..eb8b1149
+ $extraFields,
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function upgradePassword($user, string $newHashedPassword): void
+ {
+ return;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supportsClass(string $class)
+ {
+ return LdapUser::class === $class;
+ return User::class === $class;
+ }
+
+ /**
@ -139,8 +148,10 @@ index 00000000..eb8b1149
+ $this->entityManager->flush();
+ }
+
+ return $user->setUsername(\reset($email))
+ return $user
+ ->setUsername(\reset($email))
+ ->setUserIdentifier($identifier)
+ ;
+ }
+}
+