User avatar preference spontaneously changing to "Custom picture"

Yeah, I came to the same conclusion yesterday when I looked at the SSO payload in the plugin, so since we don’t use avatars at all on the WP site I’m managing, I just commented out the avatar_url line as a proof of concept and viola - no more blank avatars.

So I would have sent you a quick PR, but when I started to think about it, I didn’t know how to validate whether we’d be sending a valid avatar_url or not. The WP function get_avatar_url is supposed to return false if there isn’t one defined, so it would be easy enough to only send the avatar_url if ( false !== get_avatar_url(get_current_user_id()) ) and that would probably be an improvement, but I don’t know for sure if that would solve the problem entirely because you could be sending invalid (but non-false) URLs depending on how your WP environment is set up.

Maybe the right thing to do is both your setting in the wp-discourse plugin so WP admins can turn off any avatar syncing (like I would in the case of this particular integration) and to also implement the logic I wrote above so that we never send avatar_url when get_avatar_url returns false.