• Resolved arskrigitsioniets

    (@arskrigitsioniets)


    After test authorization through vk to my admin account, it got a vk avatar. Then I change email on my admin account but that avatar is still here. I set new gravatar but it doesn’t work, I still have VK avatar and can’t change it. I can’t register new vk accunt with my admin email to change avatar because VK requires an additional phone number to register.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support gVectors Support

    (@gvectorssupport)

    Hi @arskrigitsioniets,

    Please add the following code in your active theme’s functions.php file, delete all caches and check again. The issue should be solved.

    add_filter('get_avatar', function ($avatar, $user_id) {
        if (is_numeric($user_id)) {
            delete_user_meta($user_id, 'wpdiscuz_social_avatar');
        } else if (is_string($user_id)) {
            $user = get_user_by('email', $user_id);
            if ($user && $user->ID) {
                delete_user_meta($user->ID, 'wpdiscuz_social_avatar');
            }
        }
        return $avatar;
    }, 1, 2);

    Please don’t forget to press CTRL+F5 on the frontend.

    Thread Starter arskrigitsioniets

    (@arskrigitsioniets)

    It works, thanks. What does this code do?

    Plugin Support gVectors Support

    (@gvectorssupport)

    Hi @arskrigitsioniets,

    The code deletes the avatar that has come from the social network.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change vk avatar after changing email?’ is closed to new replies.