Work with users
user(username, ...) users_list(type, page = NULL, ...) user_create(name, email, username, password, ...) user_activate(user_id, ...) user_delete(user_id, ...) user_update_email(username, email, ...) user_update_username(username, new_username, ...)
username | A user name |
---|---|
... | Named parameters passed on to |
type | A type of user, one of active, staff, new, suspended, blocked, or suspect |
page | (integer) a page number for pagination. records per page is fixed at 100 (that is: up to 100) |
name | a name |
an email address |
|
password | a password |
user_id | a user id |
new_username | a username |
note that there is no paging, so if you have more than 100 users, you only get the first 100. :sad panda:
if (FALSE) { # list a user user('sckott') user('cboettig') # list users users_list('staff') users_list('new') NROW(users_list('active', page = 1)) NROW(users_list('active', page = 2)) # create a user (x <- user_create("jane doe", "janie@doe.com", "jane_doe", "fTh6bmoPaaWrlI5fLDM6wy")) # activate a user user_activate(x$user_id) # upate email address user_update_email(username = 'jane_doe', email = 'jane2@doe.com') # upate user name user_update_username('jane_doe', 'jane_doe5') # delete a user user_delete(x$user_id) }