Because we do not expose a field in the comment form for a registered user to enter their e-mail address, when a comment is created, we automatically insert $user->mail into {comment}.mail. However, if the user changes their e-mail address, there is no comment_user_update() to update {comment}.mail to the current value. This becomes a problem for instance with comment notifications, if we want to use $comment->mail to send the notification mail, we have their old address. Oops.
This also applies to {comment}.name which can hold an old value.
Eventually the proper thing will to be to attach a comment->author user object, which will adapt itself loading in the entered username, e-mail, and hostname if the author is an anonymous user, but that will be a separate issue. Implementing comment_user_update() is good to fix the bug in the meantime.
Comments
Comment #1
dave reidComment #2
dave reidThis affects the comment_notify module.
Comment #3
andypostanother brink on the road to make email optional
Comment #4
andypostAlso related #472202: 'Name' value for anonymous comments can conflict with registered usernames
Comment #13
catchmail is explicitly set to NULL if the comment author isn't anonymous now (see Comment::preSave()), so I believe this can be closed as outdated.