WordPress.org

Plugin Directory

Changeset 534164


Ignore:
Timestamp:
04/20/12 17:07:26 (2 years ago)
Author:
mpvanwinkle77
Message:

bugfix: notification email syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • simplr-registration-form/trunk/simplr_reg_page.php

    r440474 r534164  
    22/* 
    33Plugin Name: Simplr User Registration Form 
    4 Version: 0.1.8.2 
     4Version: 0.1.8.3 
    55Description: This a simple plugin for adding a custom user registration form to any post or page using shortcode. 
    66Author: Mike Van Winkle 
     
    1111 
    1212define('WP_DEBUG',true); 
     13define('SIMPLR_REG_VERSION','0.1.8.3'); 
    1314 
    1415//constants 
     
    2021$exit_msg = "Dude, upgrade your stinkin Wordpress Installation."; 
    2122if(version_compare($wp_version, "2.8", "<")) { exit($exit_msg); } 
     23 
    2224 
    2325//API 
     
    317319    $email = $data['email']; 
    318320    $notify = $atts['notify']; 
     321     
     322    if(strstr($notify,',')) { 
     323        $notify = explode(',',$notify); 
     324    } 
     325     
    319326    $emessage = __("Your registration was successful.".$atts['message']); 
    320327    $headers = "From: $name" . ' <' .get_option('admin_email') .'> ' ."\r\n\\"; 
    321     wp_mail($notify, "A new user registered for $name", "A new user has registered for $name.\rUsername: $user_name\r Email: $email \r",$headers); 
     328     
     329    if(!is_array($notify)) { 
     330        wp_mail($notify, "A new user registered for $name", "A new user has registered for $name.\rUsername: $user_name\r Email: $email \r",$headers); 
     331    } else { 
     332        foreach($notify as $noti) { 
     333            wp_mail($noti, "A new user registered for $name", "A new user has registered for $name.\rUsername: $user_name\r Email: $email \r",$headers);         
     334        } 
     335    } 
     336     
    322337    $emessage = $emessage . "\r\r---\r"; 
    323338        if(!isset($data['password'])) { 
Note: See TracChangeset for help on using the changeset viewer.