function shurly_api_key_form_submit in ShURLy 8
Same name and namespace in other branches
- 6 shurly_service/shurly_service.module \shurly_api_key_form_submit()
- 7 shurly_service/shurly_service.module \shurly_api_key_form_submit()
Submit handler for shurly_api_key_form(). Regenerate a user API key.
File
- shurly_service/
shurly_service.module, line 126 - Link ShURLy functionalities to services module. @todo add option to rate limit requests @todo add option for user api keys
Code
function shurly_api_key_form_submit($form, &$form_state) {
// We don't need to do anything with the submitted form...
// just generate a new API key.
$user = \Drupal::currentUser();
shurly_generate_new_api_key($user->uid);
}