DMPbelgium / roadmap

5 stars 1 forks source link

[feature] auto merge guest account with orcid #93

Open StCyr opened 7 months ago

StCyr commented 7 months ago

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

dmponline.be

Expected behaviour:

A person has a guest account in dmponline. Later she wants to become a user, logging in with her orcid ID.

System should recognise that the email addresses are the same and automaticaly add this orcid ID to the already existing account

Actual behaviour:

System replies "Email has already been taken"

Steps to reproduce:

nicolasfranck commented 7 months ago

This is already implemented in the handler handle_orcid: https://github.com/DMPbelgium/roadmap/blob/master/config/initializers/ugent.rb#L1336

There I try to match first on ORCID, and if that fails on email. In the second case I add the ORCID to it, if not already added.

It looks like this happened somewhere else, not?

StCyr commented 7 months ago

argh match didn't work because user typed her email address with an uppercase letter while it's all lowercase in the database

nicolasfranck commented 7 months ago

https://github.com/DMPbelgium/roadmap/commit/3f30560be01c4e8efe32f4b84c9aff48589046dd