[wp-hackers] comment author vs post author

Mark Jaquith mark.wordpress at txfx.net
Fri Dec 3 12:55:09 UTC 2004


Well, the problem with that is that it is logic that needs to be done at 
the time that the comment is posted, and then saved somehow, for later 
display.

I still think the e-mail address field is the best way to do this.  
True, if a user posts using the comment author's registered e-mail 
address, they'll be shown as the author, but there's an easy way around 
that: don't public post the author's registered e-mail address!  The 
e-mail address field of other commenters isn't visible to any of the 
viewers of your site, so they're not just going to be able to figure it out.

Or, if you're really intent on validating using a login cookie, you 
could check to see if the logged in user leaving the comment is the same 
user who created the post, and then designate this by saving a secret 
e-mail passphrase that could  be checked by your comments script.

I just find it easier to use a secret e-mail address... especially when 
I'm away from my computer, because I don't need to log in to WP to leave 
a comment response... I just use the e-mail address.

BoBB wrote:

>That is fantastic :) At least it was until I realized that anyone
>posting witht he email address will be viewed as the author of the
>post. What about checking if the user is logged in and then checking
>if they have the same email. And if they are not logged in just do
>nothing.
>
>
>On Fri, 03 Dec 2004 06:34:37 -0500, Mark Jaquith
><mark.wordpress at txfx.net> wrote:
>  
>
>>$authordata->user_email will be the e-mail address of the author of the
>>POST, correct.  The comment data is under $comment.
>>
>>BoBB wrote:
>>
>>    
>>
>>>So in the comment loop $authordata refers to the author of the post
>>>and not of the comment correct?
>>>
>>>      
>>>
>>_______________________________________________
>>
>>
>>hackers mailing list
>>hackers at wordpress.org
>>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>>
>>    
>>
>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/hackers_wordpress.org/attachments/20041203/89c0afba/attachment.htm


More information about the hackers mailing list