function lockr_check_registration in Lockr 7.2
Same name and namespace in other branches
- 7 lockr.module \lockr_check_registration()
Returns if this site is currently registered with Lockr.
Return value
bool TRUE if this site is registered, FALSE if not.
3 calls to lockr_check_registration()
- key_provider_lockr_build_configuration_form in plugins/
key_provider/ lockr.inc - The settings form.
- lockr_admin_form in ./
lockr.admin.inc - Form constructor for Lockr registration form.
- lockr_login_form in ./
lockr.login.inc - Register a Lockr user with already established credentials.
File
- ./
lockr.module, line 176 - Hook implementations and callbacks for lockr.
Code
function lockr_check_registration() {
$status = drupal_static(__FUNCTION__);
if (!$status) {
$status = array(
'cert_valid' => FALSE,
'exists' => FALSE,
'available' => FALSE,
'has_cc' => FALSE,
'info' => array(
'partner' => NULL,
),
);
$client = lockr_site_client();
try {
if ($client) {
$status = $client
->exists();
}
} catch (LockrClientException $e) {
watchdog_exception('lockr', $e);
}
}
return $status;
}