Node emails not saved

Created on 11 May 2012, over 12 years ago
Updated 26 September 2024, 3 months ago

Apparently it's done this way because when a node is updated it checks if the email field is empty or not to decide if it needs to send emails.

function protected_node_node_update($node) {
...
if ($node->protected_node_is_protected && !empty($node->protected_node_emails)) {
  module_load_include('mail.inc', 'protected_node');
  protected_node_send_mail($node);
}
..

This doesn't look like an expected user experience. When I edit a protected node I want to know to which email it has/will been sent. But in fact I need this feature for another reason. I've created a "please enter you email" form, and when a user enter his email a see a list of all protected nodes for which he has received a password. This is only possible if emails are stored somewhere.

So the proposed solution is to save the emails in the protected_nodes table. Then when we need to know if emails should be sent we can simply check if the input emails are different than the one saved in the database.

Is there any other reason why emails are currently not saved?

patch following

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland idflood

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024