Thread:Project:Support desk/Users of Read Only Group has editing rights

Users of Read Only Group has editing rights. One option is to set $wgGroupPermissions['user']['edit'] = false; where all the users who dont belong to a group are unable to Edit. is there any way we can remove the user belonging to Read Only group from the user group through code.