Fix user info not displayed correctly when group doesn't map cleanly

This is identical to commit aec060e which fixed #3397. The same bug manifests itself when getting user information - when the users main group isn't in /etc/group all of the user fields are returned blank.