-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add profile user to Visit hook event args #26
Comments
Yeah, unless we add this restriction manually in the arg code or something, we shouldn't add this until it is possible for the user to impose this restriction themselves. If we hard-code this though, it will be difficult to maintain back-compat if we want to switch to soft-coding it later. Although really, I doubt that folks will ever want to award points to a user for visiting their own profile, specifically. But I could be wrong. |
Maybe we are approaching this wrong though. This will award a user when somebody visits their profile, but can't be used to award the visitor for visiting a profile, specifically. So maybe we really want a Visit Profile event instead. But then, I don't know if that is really a feature that is needed or not. |
Actually, it isn't so much the back-compat as the fact that legacy users will be expecting it to behave the way that it did previously, which may cause problems. But really, like we said before, I doubt that awarding users for visiting their own profile will be a priority. And the same for awarding users for visiting a profile. |
So for now, I guess we might as well add the arg to the Visit event, and limit it to only firing for users other than the current user. |
Note, however, that this event also fires when a user is not logged in, which would allow users to rack up points by logging out and then visiting their profile. This wouldn't be as big of an issue if there was a way for users to set a condition that would limit the reaction to firing only for logged-in users, but there currently isn't. (And really, even then users might not realize that they need to set that. Prompted me to create WordPoints/wordpoints#599. But I digress.) In some cases folks might want to award for visits from logged-out "guests", but in other cases this is just ripe for abuse. |
Let's pursue some of these features in WordPoints, and then revisit this later when users will have more options. |
This will allow the Visit event to be used to award points to a user when somebody visits their profile.
The only issue is that right now there is no way to also prevent it from awarding points when they visit their own profile. But that is an upstream issue, partly.
The text was updated successfully, but these errors were encountered: