drupalr.authenticate: Authenticate to a Drupal website

Description Usage Arguments Value Author(s) Examples

View source: R/drupal.R

Description

This function authenticates to a Drupal website, returning a handle for future requests.

Usage

1
drupalr.authenticate(d_url, d_name, d_pass)

Arguments

d_url

The base URL of the Drupal website you wish to authenticate to.

d_name

Username on the Drupal website.

d_pass

Password for the Drupal website.

Value

A CURL handle that can be used for future requests.

Author(s)

Ed Baker

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (d_url, d_name, d_pass) 
{
    post <- POST(paste0(d_url, "/user/login"), body = list(name = d_name, 
        pass = d_pass, form_id = "user_login", op = "Log in"))
    h <- handle(d_url)
    return(h)
  }

edwbaker/DrupalR documentation built on Aug. 16, 2017, 10:57 a.m.