Skip to contents

[Experimental]

Usage

user_reset_password(
  email,
  invalidate = FALSE,
  url = get_default_url(),
  un = get_default_un(),
  pw = get_default_pw(),
  retries = get_retries()
)

Arguments

email

(character) The email address of the User account whose password is to be reset.

invalidate

(lgl) If TRUE, the User's current password is immediately invalidated, regardless of whether the reset is completed. This requires an authenticated User with permission to do this. Default: FALSE.

url

The ODK Central base URL without trailing slash.

Default: get_default_url.

Set default url through ru_setup(url="...").

See vignette("Setup", package = "ruODK").

un

The ODK Central username (an email address). Default: get_default_un. Set default un through ru_setup(un="..."). See vignette("Setup", package = "ruODK").

pw

The ODK Central password. Default: get_default_pw. Set default pw through ru_setup(pw="..."). See vignette("Setup", package = "ruODK").

retries

The number of attempts to retrieve a web resource.

This parameter is given to RETRY(times = retries).

Default: 3.

Value

A list with a single element success (TRUE) as per the ODK Central API docs.

Details

Anybody can initiate a reset of any User's password. An email is sent with instructions on how to complete the password reset; it contains a token that is required to complete the process. If the email address provided does not match any User in the system, that address is still sent an email informing them of the attempt and that no account was found.

Examples

if (FALSE) { # \dontrun{
# See vignette("setup") for setup and authentication options
# ruODK::ru_setup(svc = "....svc", un = "me@email.com", pw = "...")

user_reset_password(email = "my.email.address@getodk.org")
# > $success
# > [1] TRUE
} # }