• Resolved Reinis.me

    (@reinisme)


    Hi! We are using NSL in our recent project where we have only the Facebook authorization activated. And there we have faced a very strange issue – few users (2 of ~50) have got wrong pictures saved as their avatars – they do not recognize these photos and say that people pictured are unfamiliar to them. 😆

    We also checked their e-mails on the Gravatar but they don’t have any avatars saved there.

    NSL is the only plugin (out of very few totally) which is dealing with user stuff and users don’t have access to admin panel so they can’t change their avatars.

    We are so suprised that we even don’t know where to start the investigation.

    Any ideas how and why this could been happening?

    Thank you!

    • This topic was modified 5 years ago by Reinis.me.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @reinisme

    I haven’t met with such problem before. But what you need to know is that, Nextend Social Login stores the avatars that are returned by the API of the selected provider for the given account.

    We are storing the avatars in the “wp-content\uploads\nsl_avatars” folder with hashed file names. Can you see the problematic avatars pointing to that folder?
    If they don’t, then I assume the avatars that we stored are overridden by a third party plugin.
    In this case, what you could do is disabling all plugins except Nextend Social Login, change your theme to a WordPress default one like Twenty Twenty-One and see if the proper avatars are appearing in the Users table for those users. If they do, then you could start enabling the plugins one by one or in small groups and check those avatars each time. Once you see the different avatars appearing, you managed to find the plugin that overrides the avatars that we stored.

    Thread Starter Reinis.me

    (@reinisme)

    Yep, they are present in the nsl’s folder.

    We are having a custom theme built on Root’s Sage starter theme and we don’t have any plugin dealing with users in any way which makes all this even more strange. 😀

    We have a custom registration form however but we just do simple wp_user_insert for few fields and we don’t touc the default avatar beahaviour.

    I’m now wondering – is there any way we can reset/delete the avatars for these users to force them being requested once again on their next login?

    Plugin Support Laszlo

    (@laszloszalvak)

    Hi @reinisme

    We actually store the md5 value of the avatars when we store the avatars. So if the avatar comes from Facebook indeed, then each time the person logs in with Facebook we will compare the md5 value of the stored file with the md5 value of the avatar.
    IF the md5 values match then we don’t have to do anything, since the old avatar and the avatar coming from Facebook API are the same.
    If the md5 values are different, then that means the user changed the avatar on Facebook, so we will replace the old avatar with the new one and we will store the new md5 value.

    So as you can see, normally we automatically update the avatars if the avatars are different. Could you ask these users to login with Facebook again?

    If the avatars not updated after they logged in with Facebook again, then is it possible that you have other providers configured as well, e.g. Google, Twitter and they actually registered their accounts with those providers? Since that way Facebook won’t override the avatars coming from the other providers, as the provider that originally set the avatar will have higher priority.

    Thread Starter Reinis.me

    (@reinisme)

    Ok, I see that nsl_user_avatar_md5 usermeta there. So I’ll delete it to force the avatar update on next login just to be sure and let’s see then.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Few users getting wrong avatars’ is closed to new replies.