WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] Use of user_* global variables in email (1 post)

  1. wobin
    Member
    Posted 5 years ago #

    --- wp-contact-form-7.php.orig  2009-02-23 11:19:54.723324382 +0100
    +++ wp-contact-form-7.php       2009-02-23 11:40:47.316438132 +0100
    @@ -308,6 +308,10 @@
                 // Special [wpcf7.remote_ip] tag
                 if ('wpcf7.remote_ip' == $matches[1])
                     return preg_replace('/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR']);
    +                       // Special global variables
    +                       else if (preg_match('/^user_/', $matches[1]) &&
    +                                        isset($GLOBALS[$matches[1]]))
    +                               return $GLOBALS[$matches[1]];
    
                 return $matches[0];
             }

    http://wordpress.org/extend/plugins/contact-form-7/

Topic Closed

This topic has been closed to new replies.

About this Topic