Purge users under /home and copy protected nodes
Hi,
We have a requirement where user can change their email addresses which is being primarily used for their login to cq. The users are first created in LDAP and they synced with CQ and that is when we create users under /home/... /user . We also create sub-nodes beneath the user node for saving some of their profile items.
So when the user changes their email and verify themselves, i want to create a new usernode with their new email and purge the last used email and before i purge that account i want to copy their profile items to the new user node but these items are protected. I tried doing copy by JcrUtil but that fails.
The solution that i am thinking is to read the properties from those protected nodes and copy them to new usernode but i want to avoid doing that. Is there any other solution to achieve it and purging protected nodes. PS: I don't want to disable the user i want to purge them.