Skip to:
Content
Pages
Categories
Search
Top
Bottom

hook to delete account ?

  • Hi,
    i need to run a function every time a user is being deleted. My plugin uses a custom database table that hold the member’s information. I need to remove the user from this table when ever one is being deleted. I have tried to use the delete_user action but it didn’t work.
    Any help would be much appreciated .

Viewing 4 replies - 1 through 4 (of 4 total)

  • Roger Coathup
    Participant

    @rogercoathup

    Are you sure you have your hook setup correctly, and that you are definitely calling the delete account code?

    the bp_core_delete_account() function calls on to wp_delete_user() and should in all certains call the delete_user action.

    Is the user getting deleted, i.e. can you confirm the delete routines are getting called correctly. Are you deleting from wp-admin and confirming the deletion?

    Hi Roger, thank you for your respond.
    i have tried something very simple like :
    `function wppl_delete_bp_member() {
    stop();
    }
    add_action( ‘delete_user’, ‘wppl_delete_bp_member’ ); `
    just to see of the function being execute.
    i also tried bp_core_action_delete_user.

    no, i am actually deleting from the “delete account” in the user’s profile under “settings”.
    and yes, the user is being deleted and removed from the wp database.

    any thing wrong that i am doing in the above?


    Roger Coathup
    Participant

    @rogercoathup

    What function is stop()?

    If you want to end the PHP execution try die() instead.

    No. There is no function stop .This is just a way for me to check if the function being execute by getting the undefined function message.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘hook to delete account ?’ is closed to new replies.
Skip to toolbar