Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide members from the Member List #142

Merged
merged 4 commits into from Feb 5, 2014
Merged

Hide members from the Member List #142

merged 4 commits into from Feb 5, 2014

Conversation

@PaulBender
Copy link
Member

PaulBender commented Oct 11, 2013

From my list posted here; allows administrators to hide the users of a specific usergroup from the member list.

nmalcolm added a commit that referenced this pull request Feb 5, 2014
@nmalcolm nmalcolm merged commit 8cb6d4e into mybb:feature Feb 5, 2014
@ImadJomaa

This comment has been minimized.

Copy link
Contributor

ImadJomaa commented on 97208b0 Feb 6, 2014

Shouldn't this be reversed to ...(!empty($group) && is_array($group))...? If the var is empty it won't continue with the expression whereas in its current state it would process the full expression. Also, as it seems, group's type isn't changed either from where it's defined and where the conditional appears (and doesn't seem to be used anywhere else?). If so, the check for array type is redundant and not needed either.

This comment has been minimized.

Copy link
Contributor

nmalcolm replied Feb 6, 2014

I guess we could drop the is_array(), but we do check if it's an array first throughout MyBB:

    if(is_array($uidin) && !empty($uidin))
    {
        $uids = implode(",", $uidin);
        $db->delete_query("joinrequests", "uid IN ({$uids}) AND gid='{$gid}'");
    }

This comment has been minimized.

Copy link
Contributor

ImadJomaa replied Feb 6, 2014

Yeah I noticed that when I was browsing through some files last night. I can't think of a good reason for that order. In all cases I found, albeit, probably not throughout the entire codebase, the variable in question is guaranteed to be an array (although I can see why in some cases the check is there).

@PaulBender PaulBender deleted the PaulBender:feature-memberlist branch Feb 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.