• Resolved Joan

    (@joandelfin)


    Hi, I am trying to get the user avatar ID right after a sign up with a social provider.

    I am using nsl_register_new_user, but it seems that at this stage the avatar ID is not yet assigned on the user meta.

    Is there any other action/filter that is triggered after the user has an avatar?

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Robert

    (@robertnextendweb)

    Hi @joandelfin

    We do not have any actions or filters that would help with this. We register users the same way as WordPress does, so the default “register_new_user” action is fired. You could try getting the attachment id over that using the global $wpdb variable, but we override the default avatar, so I am actually not sure if you would get the result you are looking for. Could you please let me know how you intend on using the id?

    Thread Starter Joan

    (@joandelfin)

    Hi @robertnextendweb,thank you for your response.

    I have a plugin that organises images in folders, and I am trying to reorganise the avatars that are imported from social providers.

    To do so, I wanted to run a method when the user just registered and pass the media ID.

    Plugin Support Robert

    (@robertnextendweb)

    You could try our “nsl_login” action. This is fired on each login (so the one after the registration as well), where the user meta should be available. Now of course the downside of this is that this runs each time someone logs in, which is not very practical. You could also create a cron job for this instead, that would get all the ids and you could feed that to the organizer plugin.

    Thread Starter Joan

    (@joandelfin)

    Thank you very much for the suggestion, I will try that.

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

The topic ‘Getting the avatar id after social sign up’ is closed to new replies.