Members App – Can members delete their account?

  • Is there a function available for members registered through the Members App to delete their account—or mark their account as deleted for the admin to remove it from the app?

    I am thinking of something similar to moderated registration, where the admin has to activate the member accounts.

  • drewm

    Approved the thread.
  • mark their account as deleted for the admin to remove it from the app?


    You can add a tag to the member with perch_member_add_tag(). So you can set up a form and on submission you can add a tag to the logged in member to mark the deletion/deactivation of their account, and log them out.


    Without the moderator having to delete their user account, you can prevent them from logging in. You can use perch_member_has_tag() to check whether the logged-in member has the tag that marks the account as deleted:


    PHP
    1. if (perch_member_logged_in() && perch_member_has_tag('deactivated')) {
    2. perch_member_log_out();
    3. PerchSystem::redirect('/account');
    4. }


    I am thinking of something similar to moderated registration, where the admin has to activate the member accounts.


    This feature already exists. Go to Members > Forms and you should find the registration form listed there. You can enable the "New members require approval" option and enter the email address of the moderator so they are notified when a new member signs up.

  • You can add a tag to the member with perch_member_add_tag(). So you can set up a form and on submission you can add a tag to the logged in member to mark the deletion/deactivation of their account, and log them out.

    Many thanks hus_hmd, the Add Tag way is a pretty good idea.
    I will have to figure out, how to either notify the moderator of that, so he/she can delete the account for good, or how to automate that with a cronjob.


    Quote

    This feature already exists. Go to Members > Forms and you should find the registration form listed there. You can enable the "New members require approval" option and enter the email address of the moderator so they are notified when a new member signs up.

    Yeah, I know, I was just giving that as a reference, to how I would like the detetion to work. 😊