Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/16/2012 02:57:03 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Add the ability to cancel a pending friendship request. Props ddean. Fixes #3897.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-classes.php

    r5729 r5931  
    208208    }
    209209
     210    public static function withdraw($friendship_id) {
     211        global $wpdb, $bp;
     212
     213        return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->friends->table_name} WHERE id = %d AND initiator_user_id = %d", $friendship_id, bp_loggedin_user_id() ) );
     214    }
     215
    210216    public static function reject($friendship_id) {
    211217        global $wpdb, $bp;
Note: See TracChangeset for help on using the changeset viewer.