Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Subscriptions plugin bug
Avatar
Jonathan Blyer
Member
sp_UserOfflineSmall Offline
Apr 23, 2019 - 8:10 am

I've been working with the Subscriptions plugin and noticed there is a significant issue when a user unsubscribes from a forum.

On line 68 of sp-subscriptions-database.php in the function sp_subscriptions_remove_forum_supscription, both the $forumid and $userid are passed into the function. However the query that is run only passes the $forumid.

The result is that when a single user tries to unsubscribe, ALL users for that forum are unsubscribed.

this is fixed by changing line 68 to

SP()->activity->delete('type='.SPACTIVITY_SUBSFORUM."&item=$forumid&uid=$userid");

This is possibly due to the fact that another function "sp_subscriptions_remove_forum_subscriptions" has this behavior intentionally and has a very similar name (note the 's' at the end).

Is there any possibility of getting this fixed applied to the code base?

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Apr 23, 2019 - 1:21 pm

Hi:

Nice catch.  We've applied your fix and pushed a new version to our repository and licensing server.  New version is 2.1.1. 

Thanks for reporting this!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online: Dylanbp
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 643
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17343
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79590