The system doesn’t response the link from the validate url, and no user has sign up as validate user. And from the code, I do not know which account name and password can be used as admin (actually not admin). Then I think that I should modify the property in the mongodb to change the property of active from false to true. Then the system will be deceived and consider the login name as a validate account.

Open the shell of mongodb:
sudo mongo

help command to see the executable comand:

show dbs show database names
show collections show collections in current database

use set current database list objects in collection foo

in this project:
use node_club_dev

Then it shows all the records in collection users.

If execute the command:
db.users.findAndModify({query:{“loginname”:”admin”},update:{“receive_at_mail” : true, “receive_reply_mail” : true, “active”:true},upsert: false})

It will produce errors:
Error: findAndModifyFailed failed: {
“errmsg” : “exception: E11000 duplicate key error index: node_club_dev.users.$loginname_1 dup key: { : null }”,
“code” : 11000,
“ok” : 0
at Error ()
at DBCollection.findAndModify (src/mongo/shell/collection.js:636:15)
at (shell):1:10 at src/mongo/shell/collection.js:636

Saying that duplicate key error.
So change to
db.users.findAndModify({query:{“loginname”:”admin”},update:{ “email” : “”,”loginname”:”admin”,”active”:true}})

Adding the loggin name to the modify field, then error disappear, and the property changed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s