diff --git a/plugin.json b/plugin.json index a3465d8..8c11f91 100644 --- a/plugin.json +++ b/plugin.json @@ -30,7 +30,8 @@ "nodebb-plugin-import-wordpress": "*", "nodebb-plugin-import-jforum": "*", "nodebb-plugin-import-esotalk": "*", - "nodebb-plugin-import-esotalk2": "*" + "nodebb-plugin-import-esotalk2": "*", + "nodebb-plugin-import-q2a": "*" }, "templates": "./public/templates" } diff --git a/server/importer.js b/server/importer.js index 9703eeb..9ddf117 100644 --- a/server/importer.js +++ b/server/importer.js @@ -2202,12 +2202,26 @@ var async = require('async'), }); }, function(cb) { - Data.getImportedUser(vote._uid, function(err, user) { - if (err) { - Importer.warn('getImportedUser: ' + vote._uid + ' err: ' + err); - } - cb(null, user); - }); + if (vote._uemail) { + User.getUidByEmail(vote._uemail, function(err, uid) { + if (err || !uid) { + return cb(null, null); + } + User.getUserData(uid, function(err, data) { + if (err || !uid) { + return cb(null, null); + } + cb(null, data); + }); + }); + } else { + Data.getImportedUser(vote._uid, function (err, user) { + if (err) { + Importer.warn('getImportedUser: ' + vote._uid + ' err: ' + err); + } + cb(null, user); + }); + } } ], function(err, results){ diff --git a/write-my-own-exporter.md b/write-my-own-exporter.md index 7d818c9..121482f 100644 --- a/write-my-own-exporter.md +++ b/write-my-own-exporter.md @@ -5,6 +5,7 @@ * https://github.com/psychobunny/nodebb-plugin-import-phpbb * https://github.com/akhoury/nodebb-plugin-import-ipboard * https://github.com/akhoury/nodebb-plugin-import-punbb +* https://github.com/xidui/nodebb-plugin-import-q2a ## Terminology