Steps to reproduce:
Visit a member's profile in ACP and click the Ban button in the Warnings & Restrictions box.
Setup any ban option you want except for the Move to option so the member remains in the same group.
Once you click the Save button this new log shows up in the member's account activity:
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 )