How to erase data through hook?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emillod
    Active Community Member
    • Apr 2017
    • 1439

    How to erase data through hook?

    Hello
    is there any chance to erase some records using hook? For example if status change to `deleted` erase all personal informations?
    I know how to prepare hook, but i don't know how to initiate erasing process..

    maybe you Maximus can help me again
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    What do you mean under 'all personal informations'? Are you talcking about data that are storing in the firstName, lastName, emailAddress, phoneNumber, etc. fields? If so, I think you can try to define its value as null. This changes will afect the data in the DB.

    Comment

    • emillod
      Active Community Member
      • Apr 2017
      • 1439

      #3
      Maximus thank you for reply.
      I mean all fields which i marked as "Personal date", here you have screenshot: https://i.imgur.com/ebl3fxT.png
      And now i want to prepare hook, which will erase all fields marked as "Personal data". Same thing as i clicked erase personal information in gui: https://i.imgur.com/OYPR6oe.png

      Comment

      • emillod
        Active Community Member
        • Apr 2017
        • 1439

        #4
        And of course i can't just overwrite those fields. I need to erase them

        Comment

        Working...