Support » Plugin: Yasr - Yet Another Stars Rating » No user ID is shown

  • Hello,

    thanks for the wonderful plugin.
    It’s actually working fine for us… only, it doesn’t show our WP userID for all the ratings we receive!!

    I marked in the yasr options to accept ratings from “anonymous non-logged in members AND for logged in members aswell”.
    We have a membership site, so ALL the ratings actually comes from people that are logged in in WP (ie. have a User ID), but somehow your plugin can’t catch the user ID and show it into the stats…

    Pls help us out
    thanks a lot

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author dudo

    (@dudo)

    Hi, thank you for using YASR!

    So, if you click on “Yet Another Stars Rating” -> “Stats” at the column “User Id”, what do you have? An empty field?

    Thread Starter Cloudflare Power Tools

    (@schifo)

    I can read “anonymous” (but the users were forcely logged in to add the rating… because the yasr UI is loaded on the restricted part of the website (you can access to it only by loggining in via WP).
    thanks

    Plugin Author dudo

    (@dudo)

    Can you please try this?

    Download this file https://gist.github.com/Dudo1985/e6906a327eeb1f5bea939ce593ac2883 and upload it here wp-content/plugins/yet-another-stars-rating/admin/settings with ftp

    This should return the user id as number instead of as user_login.

    What results do you have?

    Thread Starter Cloudflare Power Tools

    (@schifo)

    Right. Now it’s improved… at least now I see the user ID number rather than “anonymous” 😉

    But is it possible to actually show the username of persone how rated?

    Thanks a lot dudo for your help so far!

    Plugin Author dudo

    (@dudo)

    The strange part is this: the number you see now is used to get the username, using the function get_user_by, and if that function return false, return “anonymous”.

    I’ve changed the file and now it use get_userdata instead of get_user_by.

    Can you please try to download and upload it again?

    Thread Starter Cloudflare Power Tools

    (@schifo)

    Re-uploaded the new file and now, it shows “anonymous” again…

    Plugin Author dudo

    (@dudo)

    This make no sense, it is a standard WordPress function :/

    Can you please try to disable your plugin 1 by 1?

    Thread Starter Cloudflare Power Tools

    (@schifo)

    By disabling the plugins nothing changed… so I actually made click what the problem is.

    We have 2 different WP installations, one for the public website and one for the premium member area (protected with usr/pasw restricted access). YASR is installed in this latter.

    But all users pay and are actually registered in the public WP… where the shopping process takes place…

    The result of that is that the user DB of the member area is empty, therefore all users vote as “anonymous”, despite those same users are instead registered users of the other WP (public area).
    NOrmally this isn’t a problem because the plugin that manage the membership manage it all with several internal functions, but YASR clearly can’t do that as it’s not it’s core business and it would be complex if not impossible to be done.

    So, in the end, I need to apology with you, I should have figure this out before reporting my “issue”.

    I will leave you a positive review as I feel a bit guilty and anyways I like the plugin so far 😉

    Thanks and again apology
    Marc

    Plugin Author dudo

    (@dudo)

    Ahhh ok, now this make sense!

    Glad you got a solution 🙂

    Best,
    Dario

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘No user ID is shown’ is closed to new replies.