Skip to content

Commit

Permalink
fix ldap patch
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMellerin committed Jan 9, 2024
1 parent 0dfeb79 commit adc2a72
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions sources/patches/main-00-ldap-auth.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
+ }
+
+ /**
Expand Down Expand Up @@ -139,8 +148,10 @@ index 00000000..eb8b1149
+ $this->entityManager->flush();
+ }
+
+ return $user->setUsername(\reset($email))
+ return $user
+ ->setUsername(\reset($email))
+ ->setUserIdentifier($identifier)
+ ;
+ }
+}
+

0 comments on commit adc2a72

Please sign in to comment.