MONGOC_DATABASE_REMOVE_USER(3)

πŸ’– MONGOC_DATABASE_REMOVE_USER πŸ’–

okay so bestie, welcome to the mongoc_database_remove_user page β€” it's part of libmongoc</>, and it does exactly one thing: it yeets a user out of a database. that's it. that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

bool
mongoc_database_remove_user (mongoc_database_t *database,
                             const char *username,
                             bson_error_t *error);

this function removes the user named username from database. no cap, that's the entire function. it's giving "small but mighty" πŸ’…


🌸 PARAMETERS 🌸

  • database β€” a mongoc_database_t. like, the database. the one the user is chillin' in. πŸ¦‹
  • username β€” a string containing the username of the user to remove. yes, the actual username. the one you want gone. πŸ‘‹
  • error β€” an optional location for a bson_error_t, or NULL. optional!! so if you don't care about the tea, you can just pass NULL and vibe. πŸ™ˆ

πŸ’€ ERRORS πŸ’€

errors are propagated via the error parameter. and like, what kind of errors? could be socket errors, could be others if the current user is not authorized to perform the command. so basically if you're not supposed to be doing this, the server WILL let you know. main character energy from the server, honestly. 😭


⭐ RETURNS ⭐

returns true if successful β€” slay! πŸŽ‰

returns false and sets error if there are invalid arguments, or a server error, or a network error. so yeah, false means something went sideways. check your error, bestie, it's literally right there. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


and that's the page!! ty for reading, ily, go remove some users (the authorized way) 🫢

this has been libmongoc version 2.5.6, dated Oct 09, 2026 β€” catch you on the next manpage, bestie!! πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from