birtona / rent-a-role-model

Connecting teachers with female IT role models
9 stars 8 forks source link

fix XING sync task #30

Closed johanness closed 10 years ago

johanness commented 10 years ago
Fix rake task to sync profiles with XING

command to run rake task still is

bundle exec rake synchronize_users

if a user has revoked the access, he will get the flag profile_loaded => false

birtona commented 10 years ago

Thank you, I pushed it on heroku and ran the rake task successfully. But I am wondering if it was supposed to update the users profile pic too? As the fist displayed user, Anne, has a profile pic on XING but not on rent-a-role-model, I was hoping that synchronizisation would update the profile pic link, but apparently it doesn't.

johanness commented 10 years ago

Might have different reasons: If she revoked the access token, then the user has the flag profile_loaded => false. However this flag is not used yet.

It could also be that she has signed up very early and does not have her access_token stored in the DB. In this case she should sign in again to update the profile, since we use the email as the primary key.

In the future we should use the XING id as primary key and not show the users who revoked their access token.

birtona commented 10 years ago

yeah, it's the last case, her access_token is nil, I will tell her to sign in again then.