Sync avatar once during facebook association


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 (

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.



This is what i was looking for:

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