1
votes

I'm using dgu-vagrant-puppet and inside the system, when I log in and changed my email, things aren't in sync and probably I need to execute something to sync Drupal and CKAN.

Inside my file

/vagrant/src/ckanext-dgu/ckanext/dgu/theme/templates/package/read.html

I have:

${c.userobj.email}

which is empty. How can I sync user's email between both systems?

Thank you!

1

1 Answers

0
votes

Yeah there is a bit of lag between the email being changed in Drupal and it being synced to CKAN. It is done when the user clicks on a CKAN page and the Drupal cookie/session is refreshed. This cookie refresh is after a login or when Drupal has refreshed the user session cookie, which if memory serves right is every 30 minutes.

The code that writes the change to CKAN is here:

https://github.com/datagovuk/ckanext-dgu/blob/45f41f1c58a6f60258c9d4d18a3ddcbd82d5f557/ckanext/dgu/authentication/drupal_auth.py#L222-L224

If you wanted, you could write a script to sync all users in one go, based on that code, calling DrupalClient to get the user details and writing them to the CKAN user.