removeFriend($friend_guid); } else{ register_error(sprintf(elgg_echo("friends:remove:failure"), $friend->name)); $errors = true; } } catch (Exception $e) { register_error(sprintf(elgg_echo("friends:remove:failure"), $friend->name)); $errors = true; } if (!$errors) { system_message(sprintf(elgg_echo("friends:remove:successful"), $friend->name)); } // Forward back to the page you made the friend on forward($_SERVER['HTTP_REFERER']);