User registration & user profile – Profile Builder - Version 2.3.2

Version Description

  • When upgrading from an older version than 2.2.6 on a Multisite install Email Confirmation is set to yes automatically now
  • Fixed notice undefined variable from wppb_mail when using filter to not send email
  • Fixed filter wppb_curpageurl not being applied
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 2.3.2
Comparing to
See all releases

Code changes from version 2.3.1 to 2.3.2

admin/pms-cross-promotion.php CHANGED
@@ -236,7 +236,7 @@ function wppb_pms_cross_promo() {
236
  */
237
  if ( !isset($_GET['page']) || $_GET['page'] != 'profile-builder-pms-promo'){
238
  new WPPB_Add_General_Notices('wppb_pms_cross_promo',
239
- sprintf(__('Allow your users to have <strong>paid accounts with Profile Builder</strong>. %1$sFind out how >%2$s. %3$sDismiss%4$s', 'profile-builder'), "<a href='" . admin_url('options.php?page=profile-builder-pms-promo') . "'>", "</a>", "<a class='wppb-dismiss-notification' href='" . esc_url( add_query_arg('wppb_pms_cross_promo_dismiss_notification', '0') ) . "'>", "</a>"),
240
  'pms-cross-promo');
241
  }
242
 
236
  */
237
  if ( !isset($_GET['page']) || $_GET['page'] != 'profile-builder-pms-promo'){
238
  new WPPB_Add_General_Notices('wppb_pms_cross_promo',
239
+ sprintf(__('Allow your users to have <strong>paid accounts with Profile Builder</strong>. %1$sFind out how >%2$s.<br/><strong>Note:</strong> The "Subscription Plan" field will not work if you have Admin Approval and Email Confirmation set to YES %3$sDismiss%4$s', 'profile-builder'), "<a href='" . admin_url('options.php?page=profile-builder-pms-promo') . "'>", "</a>", "<a class='wppb-dismiss-notification' href='" . esc_url( add_query_arg('wppb_pms_cross_promo_dismiss_notification', '0') ) . "'>", "</a>"),
240
  'pms-cross-promo');
241
  }
242
 
features/functions.php CHANGED
@@ -85,7 +85,7 @@ if(!function_exists('wppb_curpageurl')){
85
  else
86
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
87
 
88
- if ( function_exists('apply_filters') ) apply_filters('wppb_curpageurl', $pageURL);
89
 
90
  return $pageURL;
91
  }
@@ -167,11 +167,13 @@ function wppb_mail( $to, $subject, $message, $message_from, $context = null ) {
167
  add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html"; ' ) );
168
 
169
  $sent = wp_mail( $to , $subject, $message );
 
 
 
 
170
  }
171
-
172
- do_action( 'wppb_after_sending_email', $sent, $to, $subject, $message, $send_email );
173
-
174
- return $sent;
175
  }
176
 
177
  function wppb_activate_account_check(){
85
  else
86
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
87
 
88
+ if ( function_exists('apply_filters') ) $pageURL = apply_filters('wppb_curpageurl', $pageURL);
89
 
90
  return $pageURL;
91
  }
167
  add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html"; ' ) );
168
 
169
  $sent = wp_mail( $to , $subject, $message );
170
+
171
+ do_action( 'wppb_after_sending_email', $sent, $to, $subject, $message, $send_email );
172
+
173
+ return $sent;
174
  }
175
+
176
+ return '';
 
 
177
  }
178
 
179
  function wppb_activate_account_check(){
features/upgrades/upgrades.php CHANGED
@@ -60,6 +60,15 @@ function wppb_update_patch(){
60
  wppb_new_custom_redirects_compatibility();
61
  }
62
  }
 
 
 
 
 
 
 
 
 
63
 
64
  do_action ( 'wppb_after_default_changes', PROFILE_BUILDER_VERSION, $wppb_version );
65
  }
60
  wppb_new_custom_redirects_compatibility();
61
  }
62
  }
63
+
64
+ if ( version_compare( $wppb_version, '2.2.5', '<=' ) ) {
65
+ if( is_multisite() ){
66
+ $wppb_general_settings = get_option( 'wppb_general_settings' );
67
+ $wppb_general_settings['emailConfirmation'] = 'yes';
68
+ update_option( 'wppb_general_settings', $wppb_general_settings );
69
+ }
70
+
71
+ }
72
 
73
  do_action ( 'wppb_after_default_changes', PROFILE_BUILDER_VERSION, $wppb_version );
74
  }
front-end/class-formbuilder.php CHANGED
@@ -498,8 +498,11 @@ class Profile_Builder_Form_Creator{
498
 
499
  $userdata = $this->wppb_add_custom_field_values( $global_request, $userdata, $this->args['form_fields'] );
500
 
501
- if( !isset( $userdata['role'] ) )
502
- $userdata['role'] = $this->args['role'];
 
 
 
503
 
504
  $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
505
 
@@ -512,8 +515,11 @@ class Profile_Builder_Form_Creator{
512
  wppb_signup_user( $userdata['user_login'], $userdata['user_email'], $userdata );
513
 
514
  }else{
515
- if( !isset( $userdata['role'] ) )
516
- $userdata['role'] = $this->args['role'];
 
 
 
517
 
518
  $userdata = wp_unslash( $userdata );
519
 
498
 
499
  $userdata = $this->wppb_add_custom_field_values( $global_request, $userdata, $this->args['form_fields'] );
500
 
501
+ if( ! isset( $userdata['role'] ) ) {
502
+ $userdata['role'] = $this->args['role'];
503
+ } else {
504
+ $this->args['redirect_url'] = wppb_custom_redirect_url( 'after_registration', $this->args['redirect_url'], $userdata["user_login"], $userdata['role'] );
505
+ }
506
 
507
  $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
508
 
515
  wppb_signup_user( $userdata['user_login'], $userdata['user_email'], $userdata );
516
 
517
  }else{
518
+ if( ! isset( $userdata['role'] ) ) {
519
+ $userdata['role'] = $this->args['role'];
520
+ } else {
521
+ $this->args['redirect_url'] = wppb_custom_redirect_url( 'after_registration', $this->args['redirect_url'], $userdata["user_login"], $userdata['role'] );
522
+ }
523
 
524
  $userdata = wp_unslash( $userdata );
525
 
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
- Version: 2.3.1
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
8
  Author URI: http://www.cozmoslabs.com/
9
  License: GPL2
@@ -73,7 +73,7 @@ function wppb_free_plugin_init() {
73
  *
74
  *
75
  */
76
- define('PROFILE_BUILDER_VERSION', '2.3.1' );
77
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
78
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
79
  define('WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', apply_filters('wppb_server_max_upload_size_byte_constant', wppb_return_bytes(ini_get('upload_max_filesize'))));
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/wordpress-profile-builder/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
+ Version: 2.3.2
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
8
  Author URI: http://www.cozmoslabs.com/
9
  License: GPL2
73
  *
74
  *
75
  */
76
+ define('PROFILE_BUILDER_VERSION', '2.3.2' );
77
  define('WPPB_PLUGIN_DIR', plugin_dir_path(__FILE__));
78
  define('WPPB_PLUGIN_URL', plugin_dir_url(__FILE__));
79
  define('WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', apply_filters('wppb_server_max_upload_size_byte_constant', wppb_return_bytes(ini_get('upload_max_filesize'))));
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: registration, user profile, user registration, custom field registration,
5
 
6
  Requires at least: 3.1
7
  Tested up to: 4.4.2
8
- Stable tag: 2.3.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -45,11 +45,11 @@ Users with administrator rights have access to the following features:
45
  * add a custom stylesheet/inherit values from the current theme or use the default one built into this plugin.
46
  * chose which user roles view the admin bar in the front-end of the website (Admin Bar Settings page).
47
  * select which profile fields users can see/modify.
48
- * extended functionality available via [Add-ons](http://www.cozmoslabs.com/profile-builder-add-ons/?utm_source=wp.org&utm_medium=plugin-description-page&utm_campaign=PBFree)
49
 
50
  **PROFILE BUILDER PRO**
51
 
52
- The [Pro version](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wp.org&utm_medium=plugin-description-page&utm_campaign=PBFree) has the following extra features:
53
 
54
  * Create Extra User Fields (Heading, Input, Hidden-Input, Checkbox, Agree to Terms Checkbox, Radio Buttons, DatePicker, Textareas, WYSIWYG, reCAPTCHA, Upload fields, Selects, User Role Select, Country Selects, Timezone selects, Avatar Upload)
55
  * Add Avatar Upload for users
@@ -65,12 +65,42 @@ The [Pro version](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_sourc
65
  * Access to support forums and documentation
66
  * 1 Year of Updates / Priority Support
67
 
68
- [Find out more about Profile Builder PRO](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wp.org&utm_medium=plugin-description-page&utm_campaign=PBFree)
69
 
70
 
71
- **Profile Builder Add-ons**
72
 
73
- For more functionality check out Profile Builder [Add-ons page](http://www.cozmoslabs.com/profile-builder-add-ons/?utm_source=wp.org&utm_medium=plugin-description-page&utm_campaign=PBFree)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
  = Profile Builder in your Language =
76
  We're focusing on translating Profile Builder in as many languages as we can. So far, the translations for 10 languages are almost complete, but we still need help on a lot of other languages, so please join us at [translate.cozmoslabs.com.](http://translate.cozmoslabs.com/projects/profilebuilder)
@@ -115,6 +145,11 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
115
  10. Profile Builder Login Widget
116
 
117
  == Changelog ==
 
 
 
 
 
118
  = 2.3.1 =
119
  * Refactored username exists check to search only in username
120
  * Fixed issue when there was a meta in the db with no meta key and we couldn't add our fields that had no meta key because it would generate meta name already in use
5
 
6
  Requires at least: 3.1
7
  Tested up to: 4.4.2
8
+ Stable tag: 2.3.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
45
  * add a custom stylesheet/inherit values from the current theme or use the default one built into this plugin.
46
  * chose which user roles view the admin bar in the front-end of the website (Admin Bar Settings page).
47
  * select which profile fields users can see/modify.
48
+ * extended functionality available via [Add-ons](http://www.cozmoslabs.com/profile-builder-add-ons/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree)
49
 
50
  **PROFILE BUILDER PRO**
51
 
52
+ The [Pro version](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) has the following extra features:
53
 
54
  * Create Extra User Fields (Heading, Input, Hidden-Input, Checkbox, Agree to Terms Checkbox, Radio Buttons, DatePicker, Textareas, WYSIWYG, reCAPTCHA, Upload fields, Selects, User Role Select, Country Selects, Timezone selects, Avatar Upload)
55
  * Add Avatar Upload for users
65
  * Access to support forums and documentation
66
  * 1 Year of Updates / Priority Support
67
 
68
+ [Find out more about Profile Builder PRO](http://www.cozmoslabs.com/wordpress-profile-builder/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree)
69
 
70
 
71
+ = Add-ons =
72
 
73
+ For more functionality check out [Profile Builder Add-ons page](http://www.cozmoslabs.com/profile-builder-add-ons/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree)
74
+
75
+ **Free Add-ons**
76
+
77
+ * [Email Confirmation Field](http://www.cozmoslabs.com/add-ons/email-confirmation-field/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - check if the email address entered matches the first one, making sure a user submits a valid and correct email address
78
+ * [Multiple Admin E-mails](http://www.cozmoslabs.com/add-ons/multiple-admin-e-mails/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - send user notification emails to multiple email addresses
79
+ * [Custom CSS Classes on Fields](http://www.cozmoslabs.com/add-ons/custom-css-classes-fields/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - add custom CSS classes for fields
80
+ * [Numbers and Phone Validation](http://www.cozmoslabs.com/add-ons/numbers-phone-validation/?utm_source=wp.org&utm_medium=pms-description-page&utm_campaign=PMSFree) - zip codes, phone numbers, ID's require the custom input field to contain numbers only
81
+ * [Import and Export](http://www.cozmoslabs.com/add-ons/import-export/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to import and export all Profile Builder Settings data
82
+ * [Passwordless Login](http://www.cozmoslabs.com/add-ons/passwordless-login/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow your users to login without a password
83
+ * [Maximum Character Length](http://www.cozmoslabs.com/add-ons/maximum-character-length/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - set a maximum character length for custom input or textarea fields
84
+ * [Labels Edit](http://www.cozmoslabs.com/add-ons/labels-edit/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - easily edit all Profile Builder labels
85
+ * [Placeholder Labels](http://www.cozmoslabs.com/add-ons/placeholder-labels/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - replace labels with placeholders in Profile Builder form
86
+ * [Select2](http://www.cozmoslabs.com/add-ons/select2/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - create select fields with search and filter functionality
87
+
88
+ **Premium Add-ons**
89
+
90
+ * [Social Connect](http://www.cozmoslabs.com/add-ons/social-connect/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - enable social login on your website, users can login with Facebook, Google+ or Twitter
91
+ * [WooCommerce Sync](http://www.cozmoslabs.com/add-ons/woocommerce-sync/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - integrates Profile Builder with WooCommerce, allowing you to manage Shipping and Billing fields from WooCommerce with PB and more
92
+ * [MailChimp](http://www.cozmoslabs.com/add-ons/profile-builder-mailchimp/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Mailchimp lists directly from the Register or Edit Profile forms
93
+ * [Campaign Monitor](http://www.cozmoslabs.com/add-ons/profile-builder-campaign-monitor/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allow users to subscribe to your Campaign Monitor lists directly from the Register or Edit Profile forms
94
+ * [Field Visibility](http://www.cozmoslabs.com/add-ons/field-visibility/?utm_source=wp.org&utm_medium=pb-description-page&utm_campaign=PBFree) - allows you to change the visibility options for the extra fields
95
+
96
+
97
+ = Documentation =
98
+
99
+ http://www.cozmoslabs.com/docs/profile-builder-2/
100
+
101
+ = Website =
102
+
103
+ http://www.cozmoslabs.com/wordpress-profile-builder/
104
 
105
  = Profile Builder in your Language =
106
  We're focusing on translating Profile Builder in as many languages as we can. So far, the translations for 10 languages are almost complete, but we still need help on a lot of other languages, so please join us at [translate.cozmoslabs.com.](http://translate.cozmoslabs.com/projects/profilebuilder)
145
  10. Profile Builder Login Widget
146
 
147
  == Changelog ==
148
+ = 2.3.2 =
149
+ * When upgrading from an older version than 2.2.6 on a Multisite install Email Confirmation is set to yes automatically now
150
+ * Fixed notice undefined variable from wppb_mail when using filter to not send email
151
+ * Fixed filter wppb_curpageurl not being applied
152
+
153
  = 2.3.1 =
154
  * Refactored username exists check to search only in username
155
  * Fixed issue when there was a meta in the db with no meta key and we couldn't add our fields that had no meta key because it would generate meta name already in use