We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64ca18b commit 49c0a7bCopy full SHA for 49c0a7b
ckanext/oauth2/oauth2.py
@@ -245,15 +245,15 @@ def user_json(self, user_data):
245
# Some providers, like Google and FIWARE only allows one account per email
246
user = None
247
if email:
248
- existing_user = model.User.by_email(email)
+ existing_user = model.User.by_email(email.lower())
249
if existing_user:
250
existing_user.state = (
251
"active" if existing_user.state == "active" else existing_user.state
252
)
253
user = existing_user
254
else:
255
user = model.User()
256
- user.email = email
+ user.email = email.lower()
257
name = email.partition("@")[0]
258
name = re.sub(r"\W", "_", name)
259
is_name_available = model.User.check_name_available(name)
0 commit comments