• Resolved nestormarius

    (@nestormarius)


    Hello, I would like to know if the feature to vote on comments as a guest requires an IP address to be available and stored in the wp_comments table or not for it to work. Thank you!

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

    (@gvectorssupport)

    Hi,

    Sure, the wpDiscuz logs the IP addresses as well.

    Thread Starter nestormarius

    (@nestormarius)

    Hi @gvectorssupport, thanks. May I ask where is wpDiscuz storing the logs?

    Plugin Support gVectors Support

    (@gvectorssupport)

    Hi,

    The data is stored in the following database table: wp_wc_users_voted.

    Please note that wp_ is just a prefix.
    However, IP addresses in this table are stored in hashed form.

    The logic is as follows:

    1. The WordPress comment table stores the author’s IP address and user_id.
    2. wpDiscuz checks whether the current user is logged in. A user is not allowed to vote for their own comment, so the user_id must not match the user_id of the comment author.
      In the case of guest users, wpDiscuz checks the IP address to ensure it doesn’t match the IP address of the comment author.
    3. If the checks in step 2 pass, the vote is added. Depending on whether the user is logged in, either the hashed user_id or the hashed IP address is stored.
    Thread Starter nestormarius

    (@nestormarius)

    @gvectorssupport thank you very much for the detailed explanation!

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

The topic ‘Does comment voting as guest requires an IP address?’ is closed to new replies.