does anyone know how to fix this?
Locked myself out of admin
is there a way to rebuild the database to its inital state?
I played around with the admin tools and made myself a normal user by accident. Now I cant get into admin, which is pretty disastrous as I'm the only user.
We really should not let users remove themselves as admin... Good suggestion.
If you'd like to re-add yourself as admin, type this into your console.
$ redis-cli sadd administrators [uid]
... where [uid] is probably 1.
To simply reset the database, type in:
$ redis-cli flushall
As you can tell, it's pretty easy to flush an entire database. All the more reason to make sure your server is secured!
flushallwill empty the redis database, which is the default state of NodeBB. When you run the setup script again, it will repopulate the database with the default info.
This post is deleted!
Thanks a bunch, @julian !
This should probably be added to the Documentation for users who don't know much about redis.
You're right, it should.
I'll add it to the FAQ when I get a free minute.
Note: The next version of NodeBB won't allow you to remove yourself as admin