nodebb-plugin-freelog
Advanced tools
Comparing version 0.0.11 to 0.0.12
58
index.js
@@ -7,2 +7,3 @@ const plugin = {}; | ||
const User = require.main.require('./src/user'); | ||
const db = require.main.require('./src/database'); | ||
const nconf = module.parent.require('nconf'); | ||
@@ -49,11 +50,56 @@ const async = module.parent.require('async'); | ||
console.log('secret', nconf.get('secret')); | ||
console.log(User.getUserData); | ||
var user = { | ||
'uid': 50017, | ||
'username': 'yuliang', | ||
'userslug': 'yuliang', | ||
'email': '4896819@qq.com', | ||
'email:confirmed': 0, | ||
'joindate': 1659511461079, | ||
'lastonline': 1659511461079, | ||
'picture': null, | ||
'icon:bgColor': '#2196f3', | ||
'fullname': null, | ||
'location': null, | ||
'birthday': null, | ||
'website': null, | ||
'aboutme': null, | ||
'signature': null, | ||
'uploadedpicture': null, | ||
'profileviews': 0, | ||
'reputation': 0, | ||
'postcount': 0, | ||
'topiccount': 0, | ||
'lastposttime': 0, | ||
'banned': false, | ||
'banned:expire': 0, | ||
'status': 'online', | ||
'flags': null, | ||
'followerCount': 0, | ||
'followingCount': 0, | ||
'cover:url': null, | ||
'cover:position': null, | ||
'groupTitle': null, | ||
'mutedUntil': 0, | ||
'mutedReason': null, | ||
'displayname': 'yuliang', | ||
'groupTitleArray': [], | ||
'icon:text': 'Y', | ||
'joindateISO': '2022-08-03T07:24:21.079Z', | ||
'lastonlineISO': '2022-08-03T07:24:21.079Z', | ||
'banned_until': 0, | ||
'banned_until_readable': 'Not Banned' | ||
}; | ||
// console.log(userData); | ||
userController.getUserDataByField(1, 'username', username, function(userData) { | ||
console.log(userData); | ||
next(null, userData, '[[success:authentication-successful]]'); | ||
}); | ||
next(null, user, '[[success:authentication-successful]]'); | ||
// | ||
// console.log(User.getUserData); | ||
// | ||
// // console.log(userData); | ||
// userController.getUserDataByField(1, 'username', username, function(userData) { | ||
// console.log(userData); | ||
// next(null, userData, '[[success:authentication-successful]]'); | ||
// }); | ||
}; | ||
module.exports = plugin; |
@@ -5,3 +5,3 @@ { | ||
"description": "NodeBB Forum", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"homepage": "http://www.nodebb.org", | ||
@@ -8,0 +8,0 @@ "repository": { |
4886
115