openid-connect-generic icon indicating copy to clipboard operation
openid-connect-generic copied to clipboard

automatic user creation behavior could be changed ?

Open benochen opened this issue 5 years ago • 7 comments

Hi

Thanks for this great plugin. I have a question.

When I'm connected with an account with my identity provider which is not link to an existing wordpress user, a new user is created.

If I understand correctly it is not possible for now to configure the plugin to not create the user instead. The method authentication_request_callback() contains the following line // if we didn't find an existing user, we'll need to create it if ( ! $user ) { $user = $this->create_new_user( $subject_identity, $user_claim ); if ( is_wp_error( $user ) ) { $this->error_redirect( $user ); return; } } else { // allow plugins / themes to take action using current claims on existing user (e.g. update role) do_action( 'openid-connect-generic-update-user-using-current-claim', $user, $user_claim ); } Does it make sense to add an option in a plugin to prevent the creation of user and just finalize the login for user who has be mapped to existing user in the wordpres ?

If I sumbit a PR adding this option, do you will consider it ?

benochen avatar Jul 19 '19 07:07 benochen

I have see this filter which could work but I think a settings in the UI could be interesting and more user friendly. I have created a pull request which reflects that.

benochen avatar Jul 21 '19 20:07 benochen

Thanks @ben57univ, I'll take a look at this when I get a moment during the week. I appreciate and welcome all PRs!

daggerhart avatar Jul 22 '19 15:07 daggerhart

Thanks @daggerhart . Did you have time to take a look ?

benochen avatar Aug 21 '19 11:08 benochen

Apologies for the long delay here. Getting caught back up on issues as I can. I left a question on the PR about changing the logic of the checkbox, otherwise this looks good to me. Thanks!

daggerhart avatar Oct 24 '19 10:10 daggerhart

Good morning

I have submit a PR to propose a integration of this but I receive no feedback. I'm sure you are busy but I would appreciate to know if it will be include or if I shall maintain my own version of the plugin to have this feature ?

Thanks

benochen avatar May 22 '20 08:05 benochen

Hi

Issue opened and PR submitted since several months . Is it possible to have a feedback ( or at least a timeframe in which this will be taking into account) or I will not have any chance to have this implemented in the regular plugin package updatable through wordpress ?

Regards

benochen avatar Jun 14 '20 09:06 benochen

Hi Benochen,

I'll get this commited today and get an updated release out to wp dot org

daggerhart avatar Jun 14 '20 13:06 daggerhart