You are here

function user_relationships_request_submit in User Relationships 5

Same name and namespace in other branches
  1. 5.2 user_relationships_actions.inc \user_relationships_request_submit()

Process relationship request.

File

./user_relationships_actions.inc, line 139

Code

function user_relationships_request_submit($form_id, &$form_values) {
  $requester = $form_values['requester'];
  $requestee = $form_values['requestee'];
  $relationship_type = user_relationships_relationship_type_load(array(
    'rtid' => $form_values['rtid'],
  ));
  user_relationships_request_relationship($requester, $requestee, $relationship_type);
  drupal_set_message(user_relationships_get_message('submitted', array(
    '%requester' => $requester->name,
    '%requestee' => $requestee->name,
    '%relationship_name' => $relationship_type->name,
    '%relationship_plural_name' => $relationship_type->plural_name,
  )));
  return 'user';
}