Changeset 1243475
- Timestamp:
- 09/11/2015 03:59:37 PM (11 years ago)
- Location:
- chargify/trunk
- Files:
-
- 2 edited
-
chargify.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chargify/trunk/chargify.php
r1168879 r1243475 316 316 <td>Email</td> 317 317 <td><input type="text" name="chargifySignupEmail" value="'.$email.'"></td> 318 </tr> 319 <tr> 318 </tr>'; 319 320 $form = apply_filters('chargify_signup_form_extra',$form,$d,$_REQUEST); 321 322 $form .= '<tr> 320 323 <th colspan="2">Payment Info</th> 321 324 </tr> … … 399 402 <td><input type="text" name="chargifySignupEmail" value="'.$email.'"></td> 400 403 </tr>'; 404 405 $form = apply_filters('chargify_signup_form_extra',$form,$d,$_REQUEST); 406 401 407 402 408 $products = self::products(); … … 458 464 $form .= '</form>'; 459 465 } 460 return $form;466 return apply_filters('chargify_signup_form',$form,$d,$_REQUEST,$products); 461 467 } 462 468 … … 578 584 { 579 585 wp_new_user_notification($user_id, $user_pass); 580 self::login( $user_id, $email,$trans['return_url']); 586 if(apply_filters('chargify_auto_login',true)) 587 self::login( $user_id, $email,$trans['return_url']); 581 588 } 582 589 } … … 598 605 599 606 $d = get_option("chargify"); 600 $user_login = sanitize_user( $_POST["chargifySignupEmail"]);607 $user_login = sanitize_user( apply_filters('chargify_signup_username',$_POST["chargifySignupEmail"]) ); 601 608 $user_email = apply_filters( 'user_registration_email', $_POST["chargifySignupEmail"] ); 602 if( (username_exists($user_login) || email_exists($user_email)) && !$current_user->ID)609 if(email_exists($user_email) && !$current_user->ID) 603 610 { 604 611 $_POST["chargify_signup_error"] = array('ERROR'=>"That email address is already in use, please choose another."); 605 612 return 0; 606 613 } 614 elseif(username_exists($user_login) && !$current_user->ID) 615 { 616 $_POST["chargify_signup_error"] = array('ERROR'=>"That user name is already in use, please choose another."); 617 return 0; 618 } 607 619 else 608 620 { 609 $user_pass = wp_generate_password(); 621 $user_pass = apply_filters('chargify_signup_pass',wp_generate_password()); 622 623 if(!$user_pass) { 624 $_POST["chargify_signup_error"] = array('ERROR'=>"Password mismatch, please try again"); 625 return 0; 626 } 610 627 $return_url = $_REQUEST['return_url']; 611 628 $trans = array(); … … 619 636 $trans['existing_user'] = true; 620 637 638 echo '<pre>'.print_r($trans,true).'</pre>';exit; 639 621 640 set_transient("chargify-".md5($user_email.$_POST['submit'].time()),$trans); 622 641 -
chargify/trunk/readme.txt
r1168879 r1243475 4 4 Tags: Chargify, subscription, registration, tools, membership 5 5 Requires at least: 2.9 6 Tested up to: 4. 2.27 Stable Tag: 2.0. 46 Tested up to: 4.3 7 Stable Tag: 2.0.5 8 8 9 9 WP-Chargify allows users to integrate the Chargify service with WordPress. … … 44 44 45 45 == Changelog == 46 = 2.0.5 = 47 * Add filter to change the signup form 48 * Add filter to disable automatic login after purchase 49 46 50 = 2.0.4 = 47 51 * Make the plugin safe to use with Ampersands in names
Note: See TracChangeset
for help on using the changeset viewer.