Help pulling user info

NodeBB Development

Suggested Topics


  • 0 Votes
    5 Posts
    1k Views

    @julian Thanks!

    umm.. I did insert data menually in database.
    like this,
    db.objects.insert({
    ... "_key" : "user:6",
    ... "username" : "test2",
    ... "userslug" : "test2",
    ... "email" : "[email protected]",
    ... "joindate" : 1525421227139.0,
    ... "lastonline" : 1525421227139.0,
    ... "picture" : "",
    ... "fullname" : "",
    ... "location" : "",
    ... "birthday" : "",
    ... "website" : "",
    ... "signature" : "",
    ... "uploadedpicture" : "",
    ... "profileviews" : 0,
    ... "reputation" : 0,
    ... "postcount" : 0,
    ... "topiccount" : 0,
    ... "lastposttime" : 0,
    ... "banned" : 0,
    ... "status" : "online",
    ... "uid" : 6,
    ... "password" : "$2a$12$buM7xOHIJdy.RK.eTmBph.EzPAIirzTjjDsLHjG/Y7Ogs0CvQlZES",
    ... "passwordExpiry" : 0
    ... })

    but I can't login to my nodebb project. That appear 403 error.
    Do you know why?

    sorry, I can't speak english well.

  • Custom Entity for User

    NodeBB Development
    0 Votes
    2 Posts
    893 Views

    Take a look at how we store users. We increment a global user id each time a new user is created and store the user data in an object with the name user:<userId> and we store the userId in a sorted set. You need to do something similar for businesses.

    Everytime a new business is created assign it a unique id and store it at business:<businessId> and then also store it for the user at uid:<uid>:businesses.

    It would look something like below in nodebb code. This is obviously pseudocode.

    incr businessId in database setObject businness:bussinessId businessData sortedSetAdd uid:<uid>:businesses Date.now() businessId

    Now you can retrieve a users business with the getSortedSetRange commands using the key uid:<uid>:businesses.

  • 1 Votes
    1 Posts
    775 Views

    All new users have the option sound disabled, maybe u can make function in admin/settings/user to enable it by default for new users?

  • 0 Votes
    5 Posts
    2k Views

    @TopQuark said:

    I would like to see someone develop an SSO, say, between PencilBlue or even Ghost to NodeBB.

    If Ghost or PencilBlue have support for an OAuth2 provider, then this is possible.

    At current there is no plugin to turn NodeBB into an OAuth2 provider, although that is an option as well.

  • 0 Votes
    5 Posts
    2k Views

    @psychobunny The problem is that with the ACP Post-section feature, you can only add more text, but you can't modify existing text.