Modified hook to reflect per-user GIDs.