function lockr_client in Lockr 7
Same name and namespace in other branches
- 7.3 lockr.module \lockr_client()
- 7.2 lockr.module \lockr_client()
Returns the Lockr client for this site.
2 calls to lockr_client()
- lockr_key_client in ./
lockr.module - Returns the Lockr key client.
- lockr_site_client in ./
lockr.module - Returns the Lockr site client.
File
- ./
lockr.module, line 124 - Hook implementations and callbacks for lockr.
Code
function lockr_client() {
$client =& drupal_static(__FUNCTION__, NULL);
if ($client === NULL) {
$partner = variable_get('lockr_partner');
$cert = variable_get('lockr_cert');
if (!$partner || !$cert) {
return FALSE;
}
$client = \Lockr\Lockr::create(new \Lockr\Partner($cert, $partner));
}
return $client;
}