users: Work with users

Description Usage Arguments users_list Examples

Description

Work with users

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
user(username, url = NULL, key = NULL, user = NULL, ...)

users_list(type, url = NULL, key = NULL, user = NULL, ...)

user_create(name, email, username, password, url = NULL, key = NULL,
  user = NULL, ...)

user_activate(user_id, url = NULL, key = NULL, user = NULL, ...)

user_delete(user_id, url = NULL, key = NULL, user = NULL, ...)

user_update_email(username, email, url = NULL, key = NULL, user = NULL,
  ...)

user_update_username(username, new_username, url = NULL, key = NULL,
  user = NULL, ...)

Arguments

username

A user name

url

Base url for a Discourse installation. See disc_setup

key

Your api key on the Discourse installation. See disc_setup

user

Your user name on the Discourse installation. See disc_setup

...

Named parameters passed on to HttpClient

type

A type of user, one of active, staff, new, suspended, blocked, or suspect

name

a name

email

an email address

password

a password

user_id

a user id

new_username

a username

users_list

note that there is no paging, so if you have more than 100 users, you only get the first 100. :sad panda:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
# list a user
user('sckott')
user('cboettig')

# list users
users_list('staff')
users_list('new')

# 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)

## End(Not run)

discgolf documentation built on May 1, 2019, 11:30 p.m.