Fix usernames showing as "null" and NPE related to primaryGroup not copying correctly

This commit is contained in:
Luck committed 2016-08-29 12:11:03 +01:00
1 parent 2cc65160b4
commit f5995c0afa
6 files changed
+62 -1

No files matched your search

@@ -63,6 +63,7 @@ public abstract class UserManager extends AbstractManager<UUID, User> {
public void copy(User from, User to) {
to.setNodes(from.getNodes());
to.setPrimaryGroup(from.getPrimaryGroup());
giveDefaultIfNeeded(to, true);
to.refreshPermissions();
}