Description Usage Arguments Details See Also Examples
Add a user and password to the given database on a MongoDB server for authentication purposes.
1 | mongo.add.user(mongo, username, password, db = "admin")
|
mongo |
(mongo) a mongo connection object. |
username |
(string) username to add. |
password |
(string) password corresponding to username. |
db |
(string) The database on the server to which to add the username and password. |
See http://www.mongodb.org/display/DOCS/Security+and+Authentication.
mongo.authenticate
,
mongo,
mongo.create
.
1 2 3 | mongo <- mongo.create()
if (mongo.is.connected(mongo))
mongo.add.user(mongo, "Jeff", "H87b5dog")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.