Via node access modules or node_content_access (the one that deals with the delete any, delete own content type permissions), the use of delete can be easily controlled. Removing it from the form makes the simple task of deleting a profile become complex (had to go to a bulk operations view to delete the node).

Of course simply removing the delete #access line didn't work... :-(

Changed the #redirect to become 'redirect' in submit function since redirect prevented redirection to delete page. (may not work, I just realized. I have a redirect set up between user profiles and their nodes, so they always redirect for me).

Put a submit call before the delete submit so destination is set (which determines the cancel buttons destination also).

Patch may have issues; there was already some altered code there :/

CommentFileSizeAuthor
profile_delete.patch1.4 KBhefox

Comments

YK85’s picture

Version: 6.x-1.0-beta4 » 6.x-1.x-dev
Status: Active » Needs review

+1 subscribing
Could this be reviewed and directed towards 6.x-1.x for a chance of commit? I am needing this functionality to allow users to be able to delete their own content profiles when accessing www.example.com/user/%/profile/profile''

Current patch results in:

patching file content_profile.module
Hunk #1 FAILED at 272.
Hunk #2 succeeded at 286 (offset 1 line).
1 out of 2 hunks FAILED -- saving rejects to file content_profile.module.rej
Bilmar’s picture

Subscribing - I'm coming from #787074: preview and delete buttons missing
Could anyone please update the patch to the latest dev?
Regards

fago’s picture

Status: Needs review » Closed (duplicate)