Fix get_current_max_groups_per_user. Issue #6923
Fix SQL request (thanks Yannick)
Fix typo in commit