Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mail attribute optional #74

Open
n-peugnet opened this issue Nov 18, 2022 · 2 comments
Open

Make mail attribute optional #74

n-peugnet opened this issue Nov 18, 2022 · 2 comments

Comments

@n-peugnet
Copy link

Currently, mail attribute seems to be required. Would it be possible to make it optional and let the user enter an email when creating the account ?

@vincent-peugnet
Copy link

I just made a test by not providing the email address in the Controller.
The LDAP connection modal asked me to type an Email address that later need to be verified, which is what I would expect in this case.

--- LDAPAuthController.php      2022-11-20 14:11:25.000000000 +0100
+++ "LDAPAuthController copy.php"       2022-11-20 14:11:10.000000000 +0100
@@ -77,7 +77,7 @@
                                                        function (Registration $registration) use ($user, $userLdapUsername, $userLdapMail) {
                                                                $registration
                                                                        ->provide('username', $user[strtolower($userLdapUsername)][0])
-                                                                       ->provideTrustedEmail($user[strtolower($userLdapMail)][0])
+                                                                       // ->provideTrustedEmail($user[strtolower($userLdapMail)][0])
                                                                        //->provideAvatar($user->getJpegPhoto())
                                                                        ->setPayload((array)$user['dn']);
                                                        }

@tituspijean
Copy link
Owner

I have little time to test it out myself, could you try the mentioned PR above?

Yippy added a commit to Yippy/flarum-ext-auth-ldap that referenced this issue Nov 7, 2023
 issue.

Added More validation error response for incorrect settings in extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants