1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Check Threadpermissions

Discussion in 'XenForo Development Discussions' started by ragtek, Oct 12, 2010.

  1. ragtek

    ragtek Guest

    Hi, i'm working on an Twitter Add-on.

    This Add-on should send all new Threads which guests can see to Twitter.

    Sending to Twitter works perfect, my only problem is the permissions check.
    I don't like to send "private Threads" ( for example from admin area, customer area, private/mod category)

    How can i check the read permissions if i have the thread id?
  2. ragtek

    ragtek Guest

    Ok, i think i've found something.Have to try if
    $ftpHelper $this->getHelper('ForumThreadPost');
    $threadFetchOptions = array('readUserId' => $visitor['user_id'], 'watchUserId' => $visitor['user_id']);
    $forumFetchOptions = array('readUserId' => $visitor['user_id']);
    $thread$forum) = $ftpHelper->assertThreadValidAndViewable($threadId$threadFetchOptions$forumFetchOptions);

Share This Page