User getting created when trying to sign in with the identity which doesn't exist in the system. Configuration to be provided to choose whether to allow or deny user creation when trying to login to the system using configured social networking credentials.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | user-getting-created-when-trying-to-sign-2482221-7.patch | 2.85 KB | karthikkumarbodu |
| #1 | user-getting-created-when-trying-to-sign-2482221-1.patch | 2.35 KB | karthikkumarbodu |
Comments
Comment #1
karthikkumarbodu commentedAdded " Allow user creation on login " checkbox in Hybridauth -> Widget Settings configuration to decide user creation is possible on user login.
Comment #2
duozerskKarthik,
Thank you for using the module and for the request and patch.
There is already the "Who can register accounts?" => "Nobody, only login for existing accounts is possible" setting in the "Account settings" section of the HybridAuth module settings page. It should behave exactly like you want.
Thanks
AndyB
Comment #3
karthikkumarbodu commentedAndy,
I saw the configuration but this is to block new user accounts creation and only allows users to login who already hold account in the system. It gives a error message "New account registration is not allowed." when any new user tries to signup.
I completely agree with you about blocking the registration using the "Who can register accounts?" => "Nobody, only login for existing accounts is possible" setting.
My requirement is to provide setting to decide whether to allow or deny new account creation when user tries to login to the application using his social network credentials (i.e FB, Google...). I tried logging into my application with my FB credentials, though i don't have account it simply created a new account from login screen and redirected me into the user profile page and this not i am expecting and it should show a error to the user like " You are not allowed to login in with provided credentials. Please register up to create new user account. " if we are not allowing user creation from login page.
Let me know if you still have queries or concerns.
Thanks,
Karthik
Comment #4
duozerskKarthik,
Well, not exactly - this setting is to block new user account creation through HybridAuth, the usual Drupal registration is not affected by this setting. So it shouldn't affect the regular signup/registration form - it is controlled by the Drupal core registration settings.
It looks like your concern is only about the text of the message that is shown to the user trying to login through HybridAuth when he doesn't have account on the site yet.
Thanks
AndyB
Comment #5
karthikkumarbodu commentedAndy,
You are right though we can block the user registrations through Hybridauth but registrations from "Create new account" are still possible. Right now the module allows creation of user accounts from the login page as well as the signup page. I wanted admins to control/decide whether new users creation is allowed or denied from the login page.
I want to make sure if user doesn't have a account in our application the only possible way to create account is from the signup/registration page but not form login page (treating them as they are already users of the application and creating user data for them.)
Steps to reproduce :
1) Configure Facebook widget(as example) and make the widget available on Login and Registration forms.
2) Open "user/login" page click on Facebook icon and enter the valid Facebook credentials.
3) It creates a account and redirects to the user profile page.
I want to control the step 2 by checking if the user email address is already assigned to any user in the application, if not don't create a account straight away show a validation message that you have to register into the application first.
I hope you are clear. Let me know if you still have concerns/suggestions.
Thanks,
Karthik
Comment #6
karthikkumarbodu commentedComment #7
karthikkumarbodu commentedRemoving the variable "hybridauth_widget_user_creation" on uninstallation of module.
Comment #8
duozerskKarthik,
I still don't understand... I'm telling you that a feature you want to have is already in the module - and you don't seem to get it. Please believe me - this feature is already in there. And I don't understand why you want to re-implement it using another variable for that. Please look at the "hybridauth_register" variable and how it affects the module behavior.
Thanks
AndyB