function drush_lockr_lockr_register in Lockr 7
File
- ./
lockr.drush.inc, line 38 - Hooks and callbacks for drush.
Code
function drush_lockr_lockr_register($email) {
$name = variable_get('site_name');
$client = lockr_site_client();
$password = drush_get_option('password');
try {
$client
->register($email, $password, $name);
} catch (ClientException $e) {
if ($password) {
drush_log('Email and password did not match', 'error');
}
else {
drush_log('Email is already registered, please provide a password', 'error');
}
} catch (ServerException $e) {
drush_log('An unknown error occurred, please try again.', 'error');
}
}