• Hi,
    I am developing a plugin where I need to store like count for posts in DB. I am currently using the logged-in approach and storing information along with user ID to keep it unique. But what’s the best approach to store values for non-logged-in users? To keep them as much unique as possible.
    Are sessions a good approach? Because there are certain privacy restrictions on IP storage.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    If you’re not authenticating users in some manner, then you cannot provide uniqueness to data input by them. Pretty simple, really. If you don’t store any identifying info, then I can simply provide input multiple times.

    Thread Starter Mian Shahzad Raza

    (@mianshahzadraza)

    Well, then I think I should provide an option to the user for selecting between logged-in or non-logged-in users. If uniqueness is not required then I should use sessions approach or IP based system?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’d use a cookie.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Best way to store likes for non logged-in users’ is closed to new replies.