Is there a library, class or method that an addon can access to be able to delete members?

1 Answer 1


Yup, just load the Member model:

ee()->member_model->delete_member($member_id, $heir_id);

$member_id can be a single member, or an array of ids.

$heir_id is the member_id that should take authorship of any existing entries belonging to the member being deleted.

  • Does this delete_member return some value that can be used as a flag to check if delete is succesful or not? In any case, it doesn't seem to be working for me. Nov 14, 2013 at 2:49
  • Nope, it does not return anything unfortunately. Have you stripped your code down to just the member deletion as a test? Nov 14, 2013 at 13:36
  • Okay your solution turned out to be correct. There was a hook that triggers on member_delete hook that was not returning the $member_ids needed for the delete to work. Nov 15, 2013 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.