Closed (fixed)
Project:
OpenID Connect / OAuth client
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2018 at 18:54 UTC
Updated:
9 Nov 2022 at 22:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mario steinitzThe email address is a very special user property, as it is one of the properties that requires to be unique for all Drupal users.
I anticipate this is the reason, why emails haven't been allowed for property mapping so far.
If we're going to do so now, we should add additional tests for whether the new email address is in use by another user, and raise according exceptions if so.
Comment #3
mario steinitzComment #4
leksat commented@Mario Steinitz good point!
Not sure if an exception is required. I implemented it as a Drupal log message.
Comment #5
leksat commentedWell... For some projects it can be pretty critical I think. So here is a version with an exception.
Comment #6
gugalamaciek commentedPatch to use in version 1.0.0.
Comment #7
jcnventuraThanks for working on this. It seems a good improvement. However, 1.x will not get any new features, and this is a new feature. The patch needs to be for version 2.x.
By this time, $property_name is 'mail', might as well not use the variable.
The double $this is surely an error...
Also, although this is an error, it surely is not critical. It does not threaten the integrity of the site.
Let's not reveal the username of the other account. Just use the following message: 'Could not save user info. Email address %email is already used in another account'.
And simplify the replacement variables, as we only need email now.
Use same message as above, to simplify the life of translators. Or better yet, do not throw an exception at all. Just because we can't map a field should not be a reason for the user to not be able to save the other claims. Please delete this line.
Comment #8
gugalamaciek commentedHere there is patch with improvements suggested by @jcnventura :)
It's for 1.x version.
Comment #9
jcnventuraIt probably applies already to 2.x. That part of the code hasn't changed much,
Comment #10
pcate commentedPatch works for me with version 2 of the module.
Comment #11
jcnventuraNice to know. I'll test this and probably commit, and implement the change I requested in #7.2, and change the logger message from critical to warning.
Honestly, it's a user that most likely is trying to use OpenID when he already has another account in the system. Hardly the stuff should be above a warning. It maybe should even be a notice.
Comment #14
jcnventuraComment #15
jcnventura