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

Check for thread starter

Discussion in 'XenForo Development Discussions' started by MOZ, Jul 31, 2012.

  1. MOZ

    MOZ Well-Known Member

    How can I check the visitor on a page is the thread starter in my ControllerPublic.

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Assuming $thread contains the thread record:

    $visitor = XenForo_Visitor::getInstance();
    if ($visitor['user_id'] == $thread['user_id'])
  3. ragtek

    ragtek Guest

    XenForo_Visitor::getUserId() == $thread['user_id']

    should work

    edit: niunjaad
  4. MOZ

    MOZ Well-Known Member

    Thanks guys.

Share This Page