saltstack/salt — pull request #2725 by trendels (2012-11-28 00:45:58+00:00)
Title: Correctly handle empty group list in user.present

Proposed fix for #2724

- In states.user.present, differentiate between None and empty list for
'groups': The empty list means the equivalent to passing '-G ""' to usermod,
i.e. remove all but the default group.

- In modules.useradd, always quote the value passed after the '-G' switch to
usermod and useradd, so they don't fail when we pass an empty string.