Plugin Directory

Changeset 1808613


Ignore:
Timestamp:
01/24/2018 01:53:25 PM (8 years ago)
Author:
fiddlemail
Message:

hotfix for admin email

Location:
fiddlemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fiddlemail/tags/1.0.0/includes/Fiddlemail.inc.php

    r1808581 r1808613  
    129129    /**
    130130     * @param string $email
     131     * @param boolean $force_check
    131132     * @global wpdb $wpdb
    132133     */
    133134    public static function checkEmail($email, $force_check = false) {
    134135        global $wpdb;
     136       
     137        $admin_email = get_bloginfo('admin_email');
     138        if($email == $admin_email) {
     139            return true; // dont check this
     140        }
     141        $current_user = wp_get_current_user();
     142        if(isset($current_user->user_email) && $current_user->ID > 0 && $current_user->user_email == $email) {
     143            return true;
     144        }
    135145       
    136146        if(!$force_check && self::$check_context == 'comment' && get_option('fm_comment_handling') == FIDDLEMAIL_COMMENT_SPAM) {
  • fiddlemail/trunk/includes/Fiddlemail.inc.php

    r1808581 r1808613  
    129129    /**
    130130     * @param string $email
     131     * @param boolean $force_check
    131132     * @global wpdb $wpdb
    132133     */
    133134    public static function checkEmail($email, $force_check = false) {
    134135        global $wpdb;
     136       
     137        $admin_email = get_bloginfo('admin_email');
     138        if($email == $admin_email) {
     139            return true; // dont check this
     140        }
     141        $current_user = wp_get_current_user();
     142        if(isset($current_user->user_email) && $current_user->ID > 0 && $current_user->user_email == $email) {
     143            return true;
     144        }
    135145       
    136146        if(!$force_check && self::$check_context == 'comment' && get_option('fm_comment_handling') == FIDDLEMAIL_COMMENT_SPAM) {
Note: See TracChangeset for help on using the changeset viewer.