Export profile fields (Xobor)
authorTim Düsterhus <tim@bastelstu.be>
Sat, 11 Jun 2016 17:42:08 +0000 (19:42 +0200)
committerTim Düsterhus <tim@bastelstu.be>
Wed, 10 Jul 2019 10:11:43 +0000 (12:11 +0200)
files/lib/system/exporter/XoborExporter.class.php

index 0a6f3edfd10f6a832d97e84b8b8425c383ab0235..bc88a93c92fddb2f6bbf46b996102bccdc4e52b9 100644 (file)
@@ -125,8 +125,31 @@ class XoborExporter extends AbstractExporter {
                                'lastActivityTime' => $row['online']
                        );
                        
+                       // get user options
+                       $options = array(
+                               'birthday' => $row['birthday'],
+                               'occupation' => $row['occupation'],
+                               'homepage' => $row['homepage'],
+                               'icq' => $row['icq'],
+                               'hobbies' => $row['hobby'],
+                               'aboutMe' => $row['story_editable'],
+                               'location' => $row['ploc']
+                       );
+                       switch ($row['gender']) {
+                               case 'm':
+                                       $options['gender'] = UserProfile::GENDER_MALE;
+                               break;
+                               case 'f':
+                                       $options['gender'] = UserProfile::GENDER_FEMALE;
+                               break;
+                       }
+                       
+                       $additionalData = array(
+                               'options' => $options
+                       );
+                       
                        // import user
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['id'], $data, array());
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['id'], $data, $additionalData);
                }
        }