Current time: 05-24-2012, 01:52 PM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Forum subscription and permission
02-24-2009, 01:35 AM
Post: #1
[F] Forum subscription and permission
If a user subscribes to a forum and you revoke the permissions on this forum the user still gets emails about new threads with the abstracts of the posts.

Greets,
Michael
-------------
[Image: donation_drive_sig.png]
Visit this user's website Find all posts by this user
02-24-2009, 01:36 AM
Post: #2
RE: Forum subscription and permission
I think the reason is because it's a bit complex to run a query to go and remove all subscriptions just because you may or may not have temporarily/accidentally changed the permissions on a forum.
Visit this user's website Find all posts by this user
02-25-2009, 11:44 PM
Post: #3
RE: Forum subscription and permission
But this is what should be done, no?

The reported case isn't so common, but here is a more common one:

If a normal user subscribed to a thread on a public view and then a moderator decide to move the thread to a private forum, and continue the discussion privately within the forum team, according to this bug, the subscribed user will still be able to read the start of every reply...

This is of course an unwanted behavior

Creativity is a drug I cannot live without.
[Image: 1]Support PM will be ignored
Visit this user's website Find all posts by this user
03-05-2009, 07:10 PM
Post: #4
RE: Forum subscription and permission
Try this. Please test this in-depth!

In inc/datahandler/post.php find BOTH instances:

PHP Code:
if($done_users[$subscribedmember['uid']])
{
    continue;
}                
$done_users[$subscribedmember['uid']] = 1

add after

PHP Code:
$forumpermissions forum_permissions($thread['fid'], $subscribedmember['uid']);
if(
$forumpermissions['canview'] == || $forumpermissions['canviewthreads'] == 0)
{
    continue;

Visit this user's website Find all posts by this user
03-05-2009, 07:39 PM
Post: #5
RE: Forum subscription and permission
This user has been denied support. This user has been denied support.
Good solution imho.

New MyBB plugin is "My Awards 2.0".
[Image: 468x60_SF.gif]
Visit this user's website Find all posts by this user
03-05-2009, 07:43 PM (This post was last modified: 03-05-2009 07:59 PM by MattRogowski.)
Post: #6
RE: Forum subscription and permission
I'll give it a test and feedback.

I've tested it a few times and it seems to work but I'll test it more to make sure.

Download My Plugins
My Personal Site - Twitter
[Image: eX4bjF]
Visit this user's website Find all posts by this user
03-05-2009, 10:38 PM (This post was last modified: 03-06-2009 12:07 AM by dvb.)
Post: #7
RE: Forum subscription and permission
Its looks fine and not interfering with anything...

I've tried to look at the code, understand, and compare it to other places, 2 little little things that probably doesn't matter:

1. this:
File inc\datahandlers\post.php, Line 854 Wrote:
PHP Code:
            $done_users = array(); 
exists only in the function insert_post(), should be fixed?

2. here you wrote (and as well as in usercp2.php where we normally add a subscription)
(03-05-2009 07:10 PM)Ryan Gordon Wrote:  
PHP Code:
if($forumpermissions['canview'] == || $forumpermissions['canviewthreads'] == 0
but
File showthread.php, Line 99 Wrote:
PHP Code:
if($forumpermissions['canview'] != || $forumpermissions['canviewthreads'] != 1
Does it matter? ( == 0 / != 1 )
I know that normally a permission field can be 0 or 1 so the mentioned lines should be the same but.... ?

Creativity is a drug I cannot live without.
[Image: 1]Support PM will be ignored
Visit this user's website Find all posts by this user
03-05-2009, 11:30 PM (This post was last modified: 03-05-2009 11:30 PM by Imad Jomaa.)
Post: #8
RE: Forum subscription and permission
Quote:Does it matter? ( == 0 / != 1 )

If it equals zero, it has to be zero. If it doesn't equal one, it can be 0, 2, 3, 4, etc. In this case however, it doesn't look like it matters, I could be wrong though.

Hire Me
Clicktotweet.me
Find all posts by this user
03-05-2009, 11:35 PM (This post was last modified: 03-05-2009 11:35 PM by Ryan Gordon.)
Post: #9
RE: Forum subscription and permission
1. no need

2. Permissions are either "0" (no) or "1" (yes)

So == 0 is right. We only want to check if its disabled.
Visit this user's website Find all posts by this user
03-05-2009, 11:46 PM
Post: #10
[F] Forum subscription and permission
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication