deleting a profile

hi, is it possible that the owner of a profile (member) deletes it?

You mean - - > deleting whole Member-Account?

import { members } from 'wix-members-backend';

// Sample id value:
// 'efab296e-2687-4751-9956-ee73200dd4bb'

export function myDeleteMemberFunction(id) {

  return members.deleteMember(id)
    .then(() => {
      console.log('Member deleted');
    })
    .catch((error) => {
      console.error(error);
    });
}

thank you. :slight_smile:
where do I have to add this?

@birgit-pauls16406
Are you familiar with Velo-Coding?
If not, it might be a little bit difficult task for you.

  1. You will need to get the right user/member-ID, let’s say you do it on a button-click →

  2. After you got your Member-ID, you can use the provided code above.
    The shown code must be placed on Backend, and can/will be fired by an button-click-action from frontend, sending the ID to backend.

  3. That means you will have to generate second code-part for your wished functionality on frontend, importing your export-function from backend to frontend.

But an even better solution you generate a code, which works almost completely on backend (upgrade).