ialbert/biostar-central — pull request #253 by nimiq (2014-08-02 16:59:09+00:00)
Title: Orcid integration

The library `django-allauth` manages the ORCID login process. `django-allauth` sends a signal when a new user is created using a social provider or a new social provider is connected to an existing user. I created a method `hook_social_account_added` which is executed when that signal is launched.

`hook_social_account_added` asks the user if he wants to import his bio and works from ORCID:
![1](https://cloud.githubusercontent.com/assets/6423485/3788438/fb9c5bb0-1a65-11e4-810a-52ff446f4ea4.png)

Note: this question can also be asked using a Bootstrap modal instead of that light blue alert.

If the user clicks on yes, data are imported from Orcid and stored in `user.profile.info` and he is redirected to his profile page:
![2](https://cloud.githubusercontent.com/assets/6423485/3788439/0a69bb88-1a66-11e4-9b00-7a302263e316.png)