Change user UID to start from 10000



  • I want to change the User model, so when a new member registers, the UID counter starts from 10000, and not with 1. I have changed a lot of code inside node_modules, but after registering, I still see the numbers from 1 incrementing. Where can I change this?


  • Global Moderator

    Setup your forum, and then go into your database and set the nextUid field in the global object to the uid you want to start at. The admin user will still be uid 1, but you can always create a new admin user.

    Backup your database if you care about it before doing the following

    Here's how to do it in mongo:

    db.objects.update({ _key: 'global' }, { $set: { nextUid: 10000 } })
    

    And here's redis I think:

    HMSET "global" "nextUid" "10000"


  • @pitaj Thank you, I've managed to find this during the day. Is there a way, to change this value in the code, so I dont have to change it? I've seen a lot of uniqueID-s and counterID-s for generating the unique ID, but changing them doesn't do anything


  • Global Moderator

    You only have to change it the one time. It's not anywhere in the code.


  • Admin

    For redis, it's just hset global nextUid 10000


  • Banned

    This post is deleted!

 

Suggested Topics

  • 7
  • 3
  • 2
  • 27
  • 1
| |