Skip to:
Content

BuddyPress.org

Changeset 5821


Ignore:
Timestamp:
02/21/2012 02:36:35 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove unused xprofile avatar removal code from pre-1.0 days. Fixes #4014. Props r-a-y.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-functions.php

    r5796 r5821  
    471471/**
    472472 * When a user is deleted, we need to clean up the database and remove all the
    473  * profile data from each table. Also we need to clean anything up in the usermeta table
    474  * that this component uses.
     473 * profile data from each table. Also we need to clean anything up in the
     474 * usermeta table that this component uses.
    475475 *
    476476 * @package BuddyPress XProfile
    477477 * @param $user_id The ID of the deleted user
    478  * @uses bp_get_user_meta() Get a user meta value based on meta key from wp_usermeta
    479  * @uses bp_delete_user_meta() Delete user meta value based on meta key from wp_usermeta
    480  * @uses delete_data_for_user() Removes all profile data from the xprofile tables for the user
    481478 */
    482479function xprofile_remove_data( $user_id ) {
    483480    BP_XProfile_ProfileData::delete_data_for_user( $user_id );
    484 
    485     // delete any avatar files.
    486     @unlink( bp_get_user_meta( $user_id, 'bp_core_avatar_v1_path', true ) );
    487     @unlink( bp_get_user_meta( $user_id, 'bp_core_avatar_v2_path', true ) );
    488 
    489     // unset the usermeta for avatars from the usermeta table.
    490     bp_delete_user_meta( $user_id, 'bp_core_avatar_v1'      );
    491     bp_delete_user_meta( $user_id, 'bp_core_avatar_v1_path' );
    492     bp_delete_user_meta( $user_id, 'bp_core_avatar_v2'      );
    493     bp_delete_user_meta( $user_id, 'bp_core_avatar_v2_path' );
    494481}
    495482add_action( 'wpmu_delete_user',  'xprofile_remove_data' );
Note: See TracChangeset for help on using the changeset viewer.