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