class CRM_Core_Key

Properties

static $_key
static $_sessionID

Methods

static string
privateKey()

Generate a private key per session and store in session.

static mixed|null|string
sessionID()

No description

static string
get(string $name, bool $addSequence = FALSE)

Generate a form key based on form name, the current user session and a private key. Modelled after drupal's form API

static string
validate(string $key, string $name, bool $addSequence = FALSE)

Validate a form key based on the form name.

static bool
valid($key)

No description

Details

at line 46
static string privateKey()

Generate a private key per session and store in session.

Return Value

string private key for this session

at line 61
static mixed|null|string sessionID()

Return Value

mixed|null|string

at line 84
static string get(string $name, bool $addSequence = FALSE)

Generate a form key based on form name, the current user session and a private key. Modelled after drupal's form API

Parameters

string $name
bool $addSequence Should we add a unique sequence number to the end of the key.

Return Value

string valid formID

at line 107
static string validate(string $key, string $name, bool $addSequence = FALSE)

Validate a form key based on the form name.

Parameters

string $key
string $name
bool $addSequence

Return Value

string if valid, else null

at line 135
static bool valid($key)

Parameters

$key

Return Value

bool