function key_provider_lockr_set_key_value in Lockr 7
Same name and namespace in other branches
- 7.3 plugins/key_provider/lockr.inc \key_provider_lockr_set_key_value()
- 7.2 plugins/key_provider/lockr.inc \key_provider_lockr_set_key_value()
Set callback for key_provider plugin.
1 string reference to 'key_provider_lockr_set_key_value'
File
- plugins/
key_provider/ lockr.inc, line 71
Code
function key_provider_lockr_set_key_value($config, &$form_state, $key_value) {
$name = $config['id'];
$label = $config['label'];
$old_encoded = null;
if (isset($form_state['values']['encoded'])) {
$old_encoded = $form_state['values']['encoded'];
}
$new_encoded = _lockr_set_key($name, $key_value, $label, $old_encoded);
if (!$new_encoded) {
form_set_error('', t('An error occurred in Lockr. Please try again in a moment.'));
}
else {
$form_state['values']['encoded'] = $new_encoded;
}
}