1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sync avatar once during facebook association

Discussion in 'XenForo Questions and Support' started by simonw, Oct 11, 2011.

  1. simonw

    simonw Member

    Hi all,

    i am migrating my student community over from phpBB3 to Xenforo and I would like to update the Xenforo avatar with the facebook profile picture on association with a facebook account.

    Since the synchronization of the avatar picture during registration with a facebook account is already implemented, it should only be a minor change to also allow that on the association event.

    I tried to copy the avatar update code from a new facebook registration to the association function but failed to get it working.

    The avatar should only be synchronized once during the association. This feature is therefore different from previously raised facebook avatar synchronization requests (http://xenforo.com/community/threads/suggestion-facebook-avatar-resychronisation.7440/).

    Could anyone give me a hint how to modify the association code in order to get this working?

    Thank you very much for your help.

    Regards
     
  2. simonw

    simonw Member

    This is what i was looking for:

    Code:
    $this->getModelFromCache('XenForo_Model_Avatar')->applyAvatar($userId, $avatarFile);
    Thanks, the problem is solved.
     

Share This Page