deleteDatabaseUser | R Documentation |
Deletes a user from a database.
deleteDatabaseUser(databaseId, userId)
databaseId |
the id of the database |
userId |
the (numeric) id of the user to remove from the database. |
The user will receive a notification that their permission to access the database has been revoked.
## Not run:
# Get the list of users in the database
databaseId <- "cxy12345gh"
users <- getDatabaseUsers(databaseId)
# Find the user with the email "bob@example.com"
matching <- sapply(users, function(u) u$email == "bob@example.com")
bob <- users[[which(matching)]]
# Remove the user from the database
deleteDatabaseUser(databaseId = databaseId, userId = bob$userId)
# You could also remove all users
for(user in users) {
deleteDatabaseUser(databaseId = databaseId, userId = user$userId)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.