Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • horsted 74 posts 136 karma points
    Mar 11, 2010 @ 18:30
    horsted
    0

    Delete a member

    I could use som help on deleting a member. Website visitors can subscribe to a newsletter on the website, and gets created as a member with a specific membertype. (The email is also used as the member name.)

    My take would be to have an unsubscribe page with the pasing of the email of the member to be beleted by querystring (like /[email protected]). Then find the member by the email and then delete him... 

    But how do i do it codewise? :-) And can it be done in xslt?

    Thanks in advance! 

  • Paul Blair 466 posts 731 karma points
    Mar 11, 2010 @ 20:19
    Paul Blair
    0

    Rather than deleting a member I have a switch that says they have unsubscribed.

    If they resubscibe with this email I reset their account

  • horsted 74 posts 136 karma points
    Mar 11, 2010 @ 21:25
    horsted
    0

    Thanks Paul, i'll remember that for next time. For Got it working with:

    if

     

    (Member.IsMember(umbraco.library.RequestQueryString("email")))

    {

     

    Member deleteMember = Member.GetMemberFromEmail(umbraco.library.RequestQueryString("email"));

    deleteMember.delete();

    }

  • Fredrik 41 posts 161 karma points
    Mar 12, 2010 @ 11:18
    Fredrik
    0

    Hello Horsted!

     

    Daniel Lindstrom wrote something you should keep in mind when deleting users.

    "2/2/2009 11:10:20 AM
    Daniel Lindstrom

    The usual reason for not allowing deletion of users in systems have to do with audit trail, logging and such.

    A very basic example: If user X was the last one to edit and publish a document, if you deleted that user and then for some reason needed to know by who, why and how that page was created/changed/published the data would be incomplete.

    Not being able to delete a user in an environment with audit trail and rollback features is definitely a good thing.

    You could argue that some more permanent kind of inactivation would be nice to have, some that stored the deleted user out of sight for an administrator doing everyday work."

    Regards,
    Fredrik

  • horsted 74 posts 136 karma points
    Mar 12, 2010 @ 12:19
    horsted
    0

    Hi Fredrik,

    Thanks for your response! I agree, that users (for the backend) should not be deleted. I'm deleting members who doesn't have access to the backend, which sould be fine, right? :-)

    Cheers, horsted 

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 12, 2010 @ 12:39
    Douglas Robar
    0

    I think it's okay to delete a member, though depending on the site and situation you might want to simply remove them from the relevant member group(s) as a way to 'unsubscribe' them.

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft