Redmine #5864: Users promises: Work around group setting bug on SUSE.

If you set the same group as a secondary group, which is already the
primary group of the user, the group will not be set. This might be
expected behavior, but the problem is that it also happens if you
change the primary group at the same time.

Work around the issue by setting the primary group first, together
with an empty secondary group list, and then setting the secondary
group list afterwards.