Make WordPress Core

Changeset 2464


Ignore:
Timestamp:
03/22/2005 12:29:43 AM (20 years ago)
Author:
ryan
Message:

Validate comment author email. http://mosquito.wordpress.org/view.php?id=982 Props: MtDewVirus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments-post.php

    r2436 r2464  
    3232$comment_type = '';
    3333
    34 if ( (get_settings('require_name_email') && !$user_ID) && ('' == $comment_author_email || '' == $comment_author) )
    35     die( __('Error: please fill the required fields (name, email).') );
     34if ( get_settings('require_name_email') && !$user_ID ) {
     35    if ('' == $comment_author_email || '' == $comment_author)
     36        die( __('Error: please fill the required fields (name, email).') );
     37    elseif ( !is_email($comment_author_email))
     38        die( __('Error: please enter a valid email address.') );
     39}
    3640
    3741if ( '' == $comment_content )
Note: See TracChangeset for help on using the changeset viewer.