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 to the user friends page forward("pg/friends/" . $_SESSION['user']->username . "/");