Jump to content

[BUG 4.7.4] Banning member from ACP triggers a wrong group change log in account activity

Go to solution Solved by Daniel F,

Recommended Posts

Steps to reproduce:

  1. Visit a member's profile in ACP and click the Ban button in the Warnings & Restrictions box.
  2. Setup any ban option you want except for the Move to option so the member remains in the same group.
  3. Once you click the Save button this new log shows up in the member's account activity:

    Group manually changed by admin from Members to Members.


This happens because of this code below in /applications/core/modules/admin/members/members.php on lines 2867~2871:

				if ( isset( $values['member_ban_group'] ) )
					$member->logHistory( 'core', 'group', array( 'type' => 'primary', 'by' => 'manual', 'old' => $member->member_group_id, 'new' => $values['member_ban_group'] ) );
					$member->member_group_id = $values['member_ban_group'];


The fix is to change the IF check to use this code in order to skip it when the group ID is the same instead:

if ( isset( $values['member_ban_group'] ) AND $values['member_ban_group'] != $member->member_group_id )


Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...