You are here

public function RestfulRateLimitGlobal::generateIdentifier in RESTful 7

Generates an identifier for the event and the request.

Parameters

\stdClass $account: The account object for the user making the request.

Return value

string

Overrides RestfulRateLimitBase::generateIdentifier

File

plugins/rate_limit/RestfulRateLimitGlobal.class.php, line 25
Contains RestfulRateLimitGlobal

Class

RestfulRateLimitGlobal
@file Contains RestfulRateLimitGlobal

Code

public function generateIdentifier(\stdClass $account = NULL) {
  $identifier = '';
  $identifier .= $this->name . '::';
  $identifier .= empty($account->uid) ? ip_address() : $account->uid;
  return $identifier;
}