Liam W
in memoriam 1998-2020
In the library/XenForo/User.php file, this code is in the addUsergroupChange method:
(Lines 1510-1513)
A few lines below, there is this block:
(Lines 1519-1523)
Surely the code in the second if statement will never run, as if it the statement were to pass, the first if statement would have run and therefore stopped the method?
Liam
PHP:
if (!$addGroups)
{
return true;
}
(Lines 1510-1513)
A few lines below, there is this block:
PHP:
if (isset($newGroups[$key]) && !$addGroups)
{
// already exists and we're removing the groups, so we can just remove the record
return $this->removeUserGroupChange($userId, $key);
}
(Lines 1519-1523)
Surely the code in the second if statement will never run, as if it the statement were to pass, the first if statement would have run and therefore stopped the method?
Liam