Repeated && clause

megabosx

Active member
Not sure if this is the right place to raise this as it's not really a bug but i noticed a repeated && clause in the code section that alerts tagged members in a profile post. here is the excerpt.

Code:
if ($user['user_id'] != $taggingUser['user_id']

                    && !$userModel->isUserIgnored($user, $profilePost['user_id'])
                    && !$userModel->isUserIgnored($user, $profileUser['user_id'])
                    && XenForo_Model_Alert::userReceivesAlert($user, 'profile_post', 'tag')
                    && $this->canViewProfilePostAndContainer($profilePost, $profileUser, $null, $user)
                )
                {
XenForo_Model_ProfilePost line 1947,
 

Jeremy P

Well-known member
If you look closely the lines are distinct. One checks to see if the user making the post is ignored, and the other checks to see if the user whose profile the post is on is ignored.
 
Top