Correct me if I'm wrong. I'm really not sure if what you're trying to do. Are you trying to create a unique visitor graph or are you simply trying to display the unique Visitors for that current month? However, I think MongoDB timestamp is much similar to javascript time stamp. MongoDB has some built-in command to convert it however you can just as easily do this with javaScript.
var objectIdFromDate = function (date) { return Math.floor(date.getTime() / 1000).toString(16) + "0000000000000000"; }; var dateFromObjectId = function (objectId) { return new Date(parseInt(objectId.substring(0, 8), 16) * 1000); };How to get user's (has logged in) uid or email?
-
I found that sso-github and sso-google are using email what comes from oauth api.
However,This API can't get email address.so,I can't let this plugin use profiles to bind user.
Could you tell me whether some apis is exist(e.g. if you logged in,you can get your email or uid). -
This API can't provide user's email.
Like PHP BBS,it will provide a variable to save user's profile(include uid,email).
I want to know how to get user's (has logged in) uid or email. -
You'll want to use a registration interstitial, which sso-facebook uses.
-
@julian but,how to solve the bind problem
Thanks a lot.
Maybe this can be useful:
https://github.com/julianlam/nodebb-plugin-sso-twitter/blob/master/library.js
Twitter doesn't expose email addresses either, and we also have logic to link your existing account to it as well.
Going to close as these questions are best suited for our community, please post there if you have additional questions: https://community.nodebb.org/ -
Thanks you for sharing