Index: /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 9526)
+++ /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 9527)
@@ -189,4 +189,13 @@
 
     /**
+     * Returns the identity as a {@link User} object
+     *
+     * @return the identity as user, or {@link User#getAnonymous()} if {@link #isAnonymous()}
+     */
+    public User asUser() {
+        return isAnonymous() ? User.getAnonymous() : User.createOsmUser(userInfo != null ? userInfo.getId() : 0, userName);
+    }
+
+    /**
      * Initializes the user identity manager from Basic Authentication values in the {@link org.openstreetmap.josm.data.Preferences}
      * This method should be called if {@code osm-server.auth-method} is set to {@code basic}.
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 9526)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 9527)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.gui.HelpAwareOptionPane;
 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
+import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -294,4 +295,8 @@
                 }
             }
+            // update the user information
+            if (changeset.getUser() == null) {
+                changeset.setUser(JosmUserIdentityManager.getInstance().asUser());
+            }
             // if required close the changeset
             //
Index: /trunk/test/unit/org/openstreetmap/josm/gui/JosmUserIdentityManagerTest.groovy
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/JosmUserIdentityManagerTest.groovy	(revision 9526)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/JosmUserIdentityManagerTest.groovy	(revision 9527)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui;
+package org.openstreetmap.josm.gui
+
+import org.openstreetmap.josm.data.osm.User;
 
 import static org.junit.Assert.*
@@ -50,4 +52,5 @@
         assert im.getUserName() == null
         assert im.getUserInfo() == null
+        assert im.asUser() == User.anonymous
     }
 
@@ -79,4 +82,5 @@
         assert im.getUserName() == "test"
         assert im.getUserInfo() == null
+        assert im.asUser() == new User(0, "test")
     }
 
@@ -112,4 +116,5 @@
         assert im.getUserName() == "test"
         assert im.getUserInfo() == userInfo
+        assert im.asUser() == new User(1, "test")
     }
 
@@ -285,4 +290,5 @@
         Main.pref.put "osm-server.username", null
         assert im.isAnonymous()
+        assert im.asUser() == User.anonymous
 
         // reset it
@@ -293,4 +299,5 @@
         assert im.isPartiallyIdentified()
         assert im.getUserName() == "test2"
+        assert im.asUser() == new User(0, "test2")
 
         Main.pref.put "osm-server.username", null
@@ -304,4 +311,5 @@
         assert im.isPartiallyIdentified()
         assert im.getUserName() == "test2"
+        assert im.asUser() == new User(0, "test2")
 
         // reset it
