entity_guid); //check to make sure the current user can actually edit the commentwall if ($message->canEdit()) { //delete the comment $message->delete(); //display message system_message(elgg_echo("profile:commentwall:deleted")); forward($_SERVER['HTTP_REFERER']); } } else { system_message(elgg_echo("profile:commentwall:notdeleted")); } forward($_SERVER['HTTP_REFERER']);