You are here

function user_relationships_ui_remove_ajax in User Relationships 6

Same name and namespace in other branches
  1. 7 user_relationships_ui/user_relationships_ui.forms.inc \user_relationships_ui_remove_ajax()

Ajax handler function that is utilized to display the form in a popup rather than having the full page reload for the users

1 string reference to 'user_relationships_ui_remove_ajax'
user_relationships_ui_menu in user_relationships_ui/user_relationships_ui.module
Implementation of hook_menu().

File

user_relationships_ui/user_relationships_ui.forms.inc, line 240

Code

function user_relationships_ui_remove_ajax($account, $relationship) {

  //#382668 makes sure a valid relationship id was supplied
  if (!$relationship->rid) {
    if (isset($_GET['ajax'])) {
      die;
    }
    drupal_goto();
  }
  $form = drupal_get_form('user_relationships_ui_remove', $account, $relationship);
  if (isset($_GET['ajax'])) {
    die($form);
  }
  return $form;
}