Index: uuid.module
===================================================================
--- uuid.module	(wersja 3900)
+++ uuid.module	(kopia robocza)
@@ -131,8 +131,9 @@
       $user->uuid = db_result(db_query('SELECT uuid FROM {uuid_users} WHERE uid = %d', $user->uid));
       break;
     case 'insert':
-      if (isset($user->uuid) && uuid_is_valid($user->uuid)) {
-        db_query("INSERT INTO {uuid_users} (uid, uuid) VALUES (%d, '%s')", $user->uid, $user->uuid);
+      if (isset($edit['uuid']) && uuid_is_valid($edit['uuid'])) {
+        db_query("INSERT INTO {uuid_users} (uid, uuid) VALUES (%d, '%s')", $user->uid, $edit['uuid']);
+        unset($edit['uuid']);
       }
       else if (variable_get('uuid_automatic_for_users', FALSE)) {
         db_query("INSERT INTO {uuid_users} (uid, uuid) VALUES (%d, '%s')", $user->uid, uuid_uuid());
@@ -184,7 +185,7 @@
       'field' => 'vid',
     ),
   );
-  
+
   if (array_key_exists($type, $types) && in_array($array['vid'], variable_get('uuid_automatic_for_taxonomy', array()))) {
     $field = $types[$type]['field'];
     switch ($op) {
@@ -217,7 +218,7 @@
         db_query("INSERT INTO {uuid_comments} (cid, uuid) VALUES (%d, '%s')", $a1['cid'], uuid_uuid());
       }
       break;
-      
+
     case 'update':
       if (isset($a1['uuid']) && uuid_is_valid($a1['uuid'])) {
         $exists = db_result(db_query('SELECT 1 FROM {uuid_comments} WHERE cid = %d', $a1['cid']));
