Beispiel #1
0
    if ($remove < 0) {
        $msg = 'Failed to remove this friend from your friends list.';
        return;
    }
    if (empty($remove)) {
        event::fire('USER_REMOVE_FRIEND');
        $msg = "Removed friend successfully.";
    } else {
        $msg = $add;
    }
    return $msg;
}
if ($action == "confirmFriend") {
    $id = $_GET['friendid'];
    $userid = $_GET['userid'];
    $conf = $friends->verifyFriend($userid, $id);
    if ($conf < 0) {
        $msg = 'Failed to verify this friendship.';
        return;
    }
    if (empty($conf)) {
        event::fire('USER_CONFIRM_FRIEND');
        $msg = "You are now friends with this person. View their <a href='profile.php?userid=" . $id . "'>profile</a>.";
    } else {
        $msg = $conf;
    }
    return $msg;
}
if ($action == "ignoreFriend") {
    $id = $_GET['friendid'];
    $userid = $_GET['userid'];