Fixed import issues
authorMarcel Werk <burntime@woltlab.com>
Mon, 15 Jul 2013 17:30:16 +0000 (19:30 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 15 Jul 2013 17:30:16 +0000 (19:30 +0200)
wcfsetup/install/files/lib/system/importer/UserImporter.class.php

index 2e328ecb6ddeea2efa59394184bc5a822fc6888e..e2d0b9fcfab09f66a97e7f20cb877f53c6a5f4fd 100644 (file)
@@ -37,13 +37,10 @@ class UserImporter implements IImporter {
                }
                
                // check existing user id
-               $sql = "SELECT  COUNT(*) AS count
-                       FROM    wcf".WCF_N."_user
-                       WHERE   userID = ?";
-               $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute(array($oldID));
-               $row = $statement->fetchArray();
-               if (!$row['count']) $data['userID'] = $oldID;
+               if (is_numeric($oldID)) {
+                       $user = new User($oldID);
+                       if (!$user->userID) $data['userID'] = $oldID;
+               }
                
                // get group ids
                $groupIDs = array();