How to force avatar update with SSO?

I’m using SSO and passing this array when the user logs in:

// and finally build the big array we're passing to discourse
$userParams = [
	'external_id'         => $userObject->getID(),
	'email'               => $userObject->getEmail(),
	'username'            => $name,
	'avatar_url'          => $forumThumbURL,
	'avatar_force_update' => 'true',
	'groups'              => implode( ',', $groupsArray ),

Here’s the problem, the avatar is never updated. I’m stuck with an old avatar on the site and it won’t seem to change. I can log in and out, I know this code is being called, but no change. My sidekiq queue is at 0.

It’s for an admin user, would that make any difference?

The parameters you are passing look correct to me. It should not make any difference that you are trying to set the avatar for an admin user. Are you sure that the avatar_url you are passing is correct? If you try logging in as a new user, does the avatar get set correctly?

Hey, thanks for the reply. So I tried this with a different user – and for that user it’s working. But for my admin user, no go, it won’t let go of the image it has.

I realized that the image for my admin is the one it downloaded from Gravatar (when I first set up my forum), and since then I’ve completely turned off Gravatar. But could that have something to do with why it won’t let it go?