Version Description
- Email Confirmation can now be disabled on WordPress multisite
Download this release
Release Info
| Developer | madalin.ungureanu |
| Plugin | |
| Version | 2.2.6 |
| Comparing to | |
| See all releases | |
Code changes from version 2.2.5 to 2.2.6
- admin/basic-info.php +1 -1
- admin/general-settings.php +5 -12
- admin/pms-cross-promotion.php +1 -1
- features/email-confirmation/class-email-confirmation.php +7 -11
- features/email-confirmation/email-confirmation.php +18 -23
- features/functions.php +7 -10
- features/login-widget/login-widget.php +5 -5
- front-end/class-formbuilder.php +24 -44
- front-end/default-fields/email/email.php +1 -1
- front-end/default-fields/username/username.php +1 -1
- front-end/login.php +1 -1
- index.php +2 -2
- readme.txt +4 -1
admin/basic-info.php
CHANGED
|
@@ -162,7 +162,7 @@ function wppb_basic_info_content() {
|
|
| 162 |
<h3>Paid user profiles with Profile Builder and Paid Member Subscriptions</h3>
|
| 163 |
<p>One of the most requested features in Profile Builder was for users to be able to pay for an account.</p>
|
| 164 |
<p>Now that's possible using the free WordPress plugin - <a href="<?php echo admin_url('options.php?page=profile-builder-pms-promo'); ?>">Paid Member Subscriptions</a>.</p>
|
| 165 |
-
<p><a href="<?php echo admin_url('options.php?page=profile-builder-pms-promo'); ?>" class="button">Find out
|
| 166 |
|
| 167 |
</div>
|
| 168 |
</div>
|
| 162 |
<h3>Paid user profiles with Profile Builder and Paid Member Subscriptions</h3>
|
| 163 |
<p>One of the most requested features in Profile Builder was for users to be able to pay for an account.</p>
|
| 164 |
<p>Now that's possible using the free WordPress plugin - <a href="<?php echo admin_url('options.php?page=profile-builder-pms-promo'); ?>">Paid Member Subscriptions</a>.</p>
|
| 165 |
+
<p><a href="<?php echo admin_url('options.php?page=profile-builder-pms-promo'); ?>" class="button">Find out how</a></p>
|
| 166 |
|
| 167 |
</div>
|
| 168 |
</div>
|
admin/general-settings.php
CHANGED
|
@@ -48,9 +48,7 @@ function wppb_general_settings_content() {
|
|
| 48 |
</ul>
|
| 49 |
</td>
|
| 50 |
</tr>
|
| 51 |
-
|
| 52 |
-
if ( !is_multisite() ){
|
| 53 |
-
?>
|
| 54 |
<tr>
|
| 55 |
<th scope="row">
|
| 56 |
<?php _e( '"Email Confirmation" Activated:', 'profile-builder' );?>
|
|
@@ -61,18 +59,13 @@ function wppb_general_settings_content() {
|
|
| 61 |
<option value="no" <?php if ( $wppb_generalSettings['emailConfirmation'] == 'no' ) echo 'selected'; ?>><?php _e( 'No', 'profile-builder' ); ?></option>
|
| 62 |
</select>
|
| 63 |
<ul>
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
</ul>
|
| 69 |
</td>
|
| 70 |
</tr>
|
| 71 |
-
<?php
|
| 72 |
-
}else{
|
| 73 |
-
echo '<input type="hidden" id="wppb_general_settings_hidden" value="multisite"/>';
|
| 74 |
-
}
|
| 75 |
-
?>
|
| 76 |
|
| 77 |
<tr id="wppb-settings-activation-page">
|
| 78 |
<th scope="row">
|
| 48 |
</ul>
|
| 49 |
</td>
|
| 50 |
</tr>
|
| 51 |
+
|
|
|
|
|
|
|
| 52 |
<tr>
|
| 53 |
<th scope="row">
|
| 54 |
<?php _e( '"Email Confirmation" Activated:', 'profile-builder' );?>
|
| 59 |
<option value="no" <?php if ( $wppb_generalSettings['emailConfirmation'] == 'no' ) echo 'selected'; ?>><?php _e( 'No', 'profile-builder' ); ?></option>
|
| 60 |
</select>
|
| 61 |
<ul>
|
| 62 |
+
<li class="description"><?php _e( 'This works with front-end forms only. Recommended to redirect WP default registration to a Profile Builder one using "Custom Redirects" addon.', 'profile-builder' ); ?></li>
|
| 63 |
+
<?php if ( $wppb_generalSettings['emailConfirmation'] == 'yes' ) { ?>
|
| 64 |
+
<li class="description dynamic1"><?php printf( __( 'You can find a list of unconfirmed email addresses %1$sUsers > All Users > Email Confirmation%2$s.', 'profile-builder' ), '<a href="'.get_bloginfo( 'url' ).'/wp-admin/users.php?page=unconfirmed_emails">', '</a>' )?></li>
|
| 65 |
+
<?php } ?>
|
| 66 |
</ul>
|
| 67 |
</td>
|
| 68 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
<tr id="wppb-settings-activation-page">
|
| 71 |
<th scope="row">
|
admin/pms-cross-promotion.php
CHANGED
|
@@ -34,7 +34,7 @@ function wppb_pms_cross_promo() {
|
|
| 34 |
<hr/>
|
| 35 |
<div class="wppb-row wppb-2-col">
|
| 36 |
<div>
|
| 37 |
-
<p><?php _e( 'With the new Subscriptions Field in Profile Builder, your registration forms will allow your users to
|
| 38 |
<p>Other features of Paid Member Subscriptions are:</p>
|
| 39 |
<ul>
|
| 40 |
<li><?php _e( 'Paid & Free Subscriptions', 'profile-builder' ); ?></li>
|
| 34 |
<hr/>
|
| 35 |
<div class="wppb-row wppb-2-col">
|
| 36 |
<div>
|
| 37 |
+
<p><?php _e( 'With the new Subscriptions Field in Profile Builder, your registration forms will allow your users to sign up for paid accounts.', 'profile-builder' ); ?></p>
|
| 38 |
<p>Other features of Paid Member Subscriptions are:</p>
|
| 39 |
<ul>
|
| 40 |
<li><?php _e( 'Paid & Free Subscriptions', 'profile-builder' ); ?></li>
|
features/email-confirmation/class-email-confirmation.php
CHANGED
|
@@ -429,17 +429,13 @@ class wpp_list_unfonfirmed_email_table extends PB_WP_List_Table {
|
|
| 429 |
* Now we just need to define an admin page.
|
| 430 |
*/
|
| 431 |
function wppb_add_ec_submenu_page() {
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
if(!empty($wppb_generalSettings['emailConfirmation']) && ($wppb_generalSettings['emailConfirmation'] == 'yes'))
|
| 440 |
-
add_submenu_page( 'users.php', 'Unconfirmed Email Address', 'Unconfirmed Email Address', 'manage_options', 'unconfirmed_emails', 'wppb_unconfirmed_email_address_custom_menu_page' );
|
| 441 |
-
remove_submenu_page( 'users.php', 'unconfirmed_emails' ); //hide the page in the admin menu
|
| 442 |
-
}
|
| 443 |
}
|
| 444 |
add_action('admin_menu', 'wppb_add_ec_submenu_page');
|
| 445 |
|
| 429 |
* Now we just need to define an admin page.
|
| 430 |
*/
|
| 431 |
function wppb_add_ec_submenu_page() {
|
| 432 |
+
$wppb_generalSettings = get_option('wppb_general_settings', 'not_found');
|
| 433 |
+
if($wppb_generalSettings != 'not_found') {
|
| 434 |
+
if( !empty($wppb_generalSettings['emailConfirmation']) && ($wppb_generalSettings['emailConfirmation'] == 'yes') ){
|
| 435 |
+
add_submenu_page('users.php', 'Unconfirmed Email Address', 'Unconfirmed Email Address', 'manage_options', 'unconfirmed_emails', 'wppb_unconfirmed_email_address_custom_menu_page');
|
| 436 |
+
remove_submenu_page('users.php', 'unconfirmed_emails'); //hide the page in the admin menu
|
| 437 |
+
}
|
| 438 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
}
|
| 440 |
add_action('admin_menu', 'wppb_add_ec_submenu_page');
|
| 441 |
|
features/email-confirmation/email-confirmation.php
CHANGED
|
@@ -389,7 +389,7 @@ function wppb_signup_user_notification( $user, $user_email, $activation_key, $me
|
|
| 389 |
$subject = sprintf( __( '[%1$s] Activate %2$s', 'profile-builder'), $from_name, $user );
|
| 390 |
$subject = apply_filters( 'wppb_signup_user_notification_email_subject', $subject, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, 'wppb_user_emailc_registr_w_email_confirm_email_subject' );
|
| 391 |
|
| 392 |
-
$message = sprintf( __( "To activate your user, please click the following link
|
| 393 |
$message = apply_filters( 'wppb_signup_user_notification_email_content', $message, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, 'wppb_user_emailc_registr_w_email_confirm_email_content' );
|
| 394 |
|
| 395 |
$message_context = 'email_user_activate';
|
|
@@ -625,31 +625,26 @@ function wppb_adminApproval_userEmailContent() {
|
|
| 625 |
add_action( 'wp_ajax_wppb_get_unconfirmed_email_number', 'wppb_get_unconfirmed_email_number' );
|
| 626 |
add_action( 'wp_ajax_wppb_handle_email_confirmation_cases', 'wppb_handle_email_confirmation_cases' );
|
| 627 |
|
| 628 |
-
if ( is_multisite() ){
|
| 629 |
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 634 |
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
}else{
|
| 639 |
-
$wppb_general_settings = get_option( 'wppb_general_settings', 'not_found' );
|
| 640 |
-
|
| 641 |
-
if( $wppb_general_settings != 'not_found' )
|
| 642 |
-
if( !empty($wppb_general_settings['emailConfirmation'] ) && ( $wppb_general_settings['emailConfirmation'] == 'yes' ) ){
|
| 643 |
-
global $pagenow;
|
| 644 |
-
|
| 645 |
-
if ( $pagenow == 'users.php' ){
|
| 646 |
-
add_action( 'admin_head', 'wppb_add_pending_users_header_script' );
|
| 647 |
|
| 648 |
-
}
|
| 649 |
-
if ( file_exists ( WPPB_PLUGIN_DIR . '/features/admin-approval/admin-approval.php' ) )
|
| 650 |
-
add_action( 'user_register', 'wppb_update_user_status_on_admin_registration' );
|
| 651 |
-
}
|
| 652 |
-
}
|
| 653 |
|
| 654 |
// function to delete the users from the _signups table also
|
| 655 |
function wppb_delete_user_from_signups( $user_id ) {
|
| 389 |
$subject = sprintf( __( '[%1$s] Activate %2$s', 'profile-builder'), $from_name, $user );
|
| 390 |
$subject = apply_filters( 'wppb_signup_user_notification_email_subject', $subject, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, 'wppb_user_emailc_registr_w_email_confirm_email_subject' );
|
| 391 |
|
| 392 |
+
$message = sprintf( __( "To activate your user, please click the following link:<br><br>%s%s%s<br><br>After you activate it you will receive yet *another email* with your login.", "profile-builder" ), '<a href="'.$registration_page_url.'">', $registration_page_url, '</a>.' );
|
| 393 |
$message = apply_filters( 'wppb_signup_user_notification_email_content', $message, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, 'wppb_user_emailc_registr_w_email_confirm_email_content' );
|
| 394 |
|
| 395 |
$message_context = 'email_user_activate';
|
| 625 |
add_action( 'wp_ajax_wppb_get_unconfirmed_email_number', 'wppb_get_unconfirmed_email_number' );
|
| 626 |
add_action( 'wp_ajax_wppb_handle_email_confirmation_cases', 'wppb_handle_email_confirmation_cases' );
|
| 627 |
|
|
|
|
| 628 |
|
| 629 |
+
$wppb_general_settings = get_option( 'wppb_general_settings', 'not_found' );
|
| 630 |
+
if( $wppb_general_settings != 'not_found' )
|
| 631 |
+
if( !empty($wppb_general_settings['emailConfirmation'] ) && ( $wppb_general_settings['emailConfirmation'] == 'yes' ) ){
|
| 632 |
+
if ( is_multisite() ){
|
| 633 |
+
/* don't display on network admin */
|
| 634 |
+
if( strpos($_SERVER['SCRIPT_NAME'], 'users.php') && !is_network_admin() ){ //global $pagenow doesn't seem to work
|
| 635 |
+
add_action( 'admin_head', 'wppb_add_pending_users_header_script' );
|
| 636 |
+
}
|
| 637 |
+
}else{
|
| 638 |
+
global $pagenow;
|
| 639 |
+
if ( $pagenow == 'users.php' ){
|
| 640 |
+
add_action( 'admin_head', 'wppb_add_pending_users_header_script' );
|
| 641 |
+
}
|
| 642 |
+
}
|
| 643 |
|
| 644 |
+
if ( file_exists ( WPPB_PLUGIN_DIR . '/features/admin-approval/admin-approval.php' ) )
|
| 645 |
+
add_action( 'user_register', 'wppb_update_user_status_on_admin_registration' );
|
| 646 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 647 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
|
| 649 |
// function to delete the users from the _signups table also
|
| 650 |
function wppb_delete_user_from_signups( $user_id ) {
|
features/functions.php
CHANGED
|
@@ -459,17 +459,14 @@ if ( is_admin() ){
|
|
| 459 |
else
|
| 460 |
$delete = $wpdb->delete( $wpdb->prefix.'signups', array( 'user_login' => $userLogin ) );
|
| 461 |
}
|
| 462 |
-
|
| 463 |
-
if ( is_multisite() )
|
| 464 |
-
add_action( 'wpmu_delete_user', 'wppb_delete_user_from_signups_table' );
|
| 465 |
-
|
| 466 |
-
else{
|
| 467 |
-
$wppb_generalSettings = get_option( 'wppb_general_settings' );
|
| 468 |
-
|
| 469 |
-
if ( $wppb_generalSettings['emailConfirmation'] == 'yes' )
|
| 470 |
-
add_action( 'delete_user', 'wppb_delete_user_from_signups_table' );
|
| 471 |
-
}
|
| 472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
}
|
| 474 |
|
| 475 |
|
| 459 |
else
|
| 460 |
$delete = $wpdb->delete( $wpdb->prefix.'signups', array( 'user_login' => $userLogin ) );
|
| 461 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 462 |
|
| 463 |
+
$wppb_generalSettings = get_option( 'wppb_general_settings' );
|
| 464 |
+
if ( $wppb_generalSettings['emailConfirmation'] == 'yes' ) {
|
| 465 |
+
if( is_multisite() )
|
| 466 |
+
add_action( 'wpmu_delete_user', 'wppb_delete_user_from_signups_table' );
|
| 467 |
+
else
|
| 468 |
+
add_action('delete_user', 'wppb_delete_user_from_signups_table');
|
| 469 |
+
}
|
| 470 |
}
|
| 471 |
|
| 472 |
|
features/login-widget/login-widget.php
CHANGED
|
@@ -19,14 +19,14 @@ class wppb_login_widget extends WP_Widget {
|
|
| 19 |
function widget( $args, $instance ) {
|
| 20 |
extract( $args );
|
| 21 |
|
| 22 |
-
$title = apply_filters('wppb_login_widget_title', $instance['title'] );
|
| 23 |
-
$redirect = trim($instance['redirect']);
|
| 24 |
-
$register = trim($instance['register']);
|
| 25 |
-
$lostpass = trim($instance['lostpass']);
|
| 26 |
|
| 27 |
echo $before_widget;
|
| 28 |
|
| 29 |
-
if ( $title )
|
| 30 |
echo $before_title . $title . $after_title;
|
| 31 |
|
| 32 |
echo do_shortcode('[wppb-login display="false" register_url="'.$register.'" lostpassword_url="'.$lostpass.'" redirect="'.$redirect.'"]');
|
| 19 |
function widget( $args, $instance ) {
|
| 20 |
extract( $args );
|
| 21 |
|
| 22 |
+
$title = apply_filters( 'wppb_login_widget_title', ( isset( $instance['title'] ) ? $instance['title'] : '' ) );
|
| 23 |
+
$redirect = ( isset( $instance['redirect'] ) ? trim( $instance['redirect'] ) : '' );
|
| 24 |
+
$register = ( isset( $instance['register'] ) ? trim( $instance['register'] ) : '' );
|
| 25 |
+
$lostpass = ( isset( $instance['lostpass'] ) ? trim( $instance['lostpass'] ) : '' );
|
| 26 |
|
| 27 |
echo $before_widget;
|
| 28 |
|
| 29 |
+
if ( ! empty( $title ) )
|
| 30 |
echo $before_title . $title . $after_title;
|
| 31 |
|
| 32 |
echo do_shortcode('[wppb-login display="false" register_url="'.$register.'" lostpassword_url="'.$lostpass.'" redirect="'.$redirect.'"]');
|
front-end/class-formbuilder.php
CHANGED
|
@@ -232,17 +232,10 @@ class Profile_Builder_Form_Creator{
|
|
| 232 |
$wppb_general_settings = get_option( 'wppb_general_settings', 'false' );
|
| 233 |
if ( $wppb_general_settings ){
|
| 234 |
if( !empty( $wppb_general_settings['emailConfirmation'] ) )
|
| 235 |
-
|
| 236 |
-
$wppb_email_confirmation = 'yes';
|
| 237 |
-
} else {
|
| 238 |
-
$wppb_email_confirmation = $wppb_general_settings['emailConfirmation'];
|
| 239 |
-
}
|
| 240 |
else
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
} else {
|
| 244 |
-
$wppb_email_confirmation = 'no';
|
| 245 |
-
}
|
| 246 |
if( !empty( $wppb_general_settings['adminApproval'] ) )
|
| 247 |
$wppb_admin_approval = $wppb_general_settings['adminApproval'];
|
| 248 |
else
|
|
@@ -374,14 +367,9 @@ class Profile_Builder_Form_Creator{
|
|
| 374 |
|
| 375 |
else{
|
| 376 |
$checkbox = apply_filters( 'wppb_send_credentials_checkbox_logic', '<li class="wppb-form-field wppb-send-credentials-checkbox"><label for="send_credentials_via_email"><input id="send_credentials_via_email" type="checkbox" name="send_credentials_via_email" value="sending"'.( ( isset( $request_data['send_credentials_via_email'] ) && ( $request_data['send_credentials_via_email'] == 'sending' ) ) ? ' checked' : '' ).'/>'.__( 'Send these credentials via email.', 'profile-builder').'</label></li>', $request_data, $form );
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
echo ( isset( $wppb_general_settings['emailConfirmation'] ) && ( $wppb_general_settings['emailConfirmation'] == 'yes' ) ? '' : $checkbox );
|
| 382 |
-
|
| 383 |
-
}else
|
| 384 |
-
echo '';
|
| 385 |
}
|
| 386 |
}
|
| 387 |
|
|
@@ -412,40 +400,32 @@ class Profile_Builder_Form_Creator{
|
|
| 412 |
if( isset( $wppb_general_settings['loginWith'] ) && ( $wppb_general_settings['loginWith'] == 'email' ) ){
|
| 413 |
$userdata['user_login'] = apply_filters( 'wppb_generated_random_username', Wordpress_Creation_Kit_PB::wck_generate_slug( trim( $userdata['user_email'] ) ), $userdata['user_email'] );
|
| 414 |
}
|
| 415 |
-
if ( !is_multisite() ){
|
| 416 |
-
if ( isset( $wppb_general_settings['emailConfirmation'] ) && ( $wppb_general_settings['emailConfirmation'] == 'yes' ) ){
|
| 417 |
-
$new_user_signup = true;
|
| 418 |
-
$multisite_message = true;
|
| 419 |
-
$userdata = $this->wppb_add_custom_field_values( $global_request, $userdata, $this->args['form_fields'] );
|
| 420 |
|
| 421 |
-
|
| 422 |
-
|
|
|
|
|
|
|
| 423 |
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
if( !isset( $userdata['role'] ) )
|
| 429 |
-
$userdata['role'] = $this->args['role'];
|
| 430 |
|
|
|
|
|
|
|
|
|
|
| 431 |
$userdata = wp_unslash( $userdata );
|
| 432 |
-
|
| 433 |
-
}
|
| 434 |
-
|
| 435 |
-
}else{
|
| 436 |
-
$new_user_signup = true;
|
| 437 |
-
$multisite_message = true;
|
| 438 |
-
$userdata = $this->wppb_add_custom_field_values( $global_request, $userdata, $this->args['form_fields'] );
|
| 439 |
|
|
|
|
|
|
|
|
|
|
| 440 |
if( !isset( $userdata['role'] ) )
|
| 441 |
-
|
| 442 |
|
| 443 |
-
$userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
|
| 444 |
-
/* since version 2.0.7 add this meta so we know on what blog the user registered */
|
| 445 |
-
$userdata['registered_for_blog_id'] = get_current_blog_id();
|
| 446 |
$userdata = wp_unslash( $userdata );
|
| 447 |
-
|
| 448 |
-
|
| 449 |
|
| 450 |
}elseif( $this->args['form_type'] == 'edit_profile' ){
|
| 451 |
if( isset( $wppb_general_settings['loginWith'] ) && ( $wppb_general_settings['loginWith'] == 'email' ) ){
|
| 232 |
$wppb_general_settings = get_option( 'wppb_general_settings', 'false' );
|
| 233 |
if ( $wppb_general_settings ){
|
| 234 |
if( !empty( $wppb_general_settings['emailConfirmation'] ) )
|
| 235 |
+
$wppb_email_confirmation = $wppb_general_settings['emailConfirmation'];
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
else
|
| 237 |
+
$wppb_email_confirmation = 'no';
|
| 238 |
+
|
|
|
|
|
|
|
|
|
|
| 239 |
if( !empty( $wppb_general_settings['adminApproval'] ) )
|
| 240 |
$wppb_admin_approval = $wppb_general_settings['adminApproval'];
|
| 241 |
else
|
| 367 |
|
| 368 |
else{
|
| 369 |
$checkbox = apply_filters( 'wppb_send_credentials_checkbox_logic', '<li class="wppb-form-field wppb-send-credentials-checkbox"><label for="send_credentials_via_email"><input id="send_credentials_via_email" type="checkbox" name="send_credentials_via_email" value="sending"'.( ( isset( $request_data['send_credentials_via_email'] ) && ( $request_data['send_credentials_via_email'] == 'sending' ) ) ? ' checked' : '' ).'/>'.__( 'Send these credentials via email.', 'profile-builder').'</label></li>', $request_data, $form );
|
| 370 |
+
|
| 371 |
+
$wppb_general_settings = get_option( 'wppb_general_settings' );
|
| 372 |
+
echo ( isset( $wppb_general_settings['emailConfirmation'] ) && ( $wppb_general_settings['emailConfirmation'] == 'yes' ) ? '' : $checkbox );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 373 |
}
|
| 374 |
}
|
| 375 |
|
| 400 |
if( isset( $wppb_general_settings['loginWith'] ) && ( $wppb_general_settings['loginWith'] == 'email' ) ){
|
| 401 |
$userdata['user_login'] = apply_filters( 'wppb_generated_random_username', Wordpress_Creation_Kit_PB::wck_generate_slug( trim( $userdata['user_email'] ) ), $userdata['user_email'] );
|
| 402 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 403 |
|
| 404 |
+
if ( isset( $wppb_general_settings['emailConfirmation'] ) && ( $wppb_general_settings['emailConfirmation'] == 'yes' ) ){
|
| 405 |
+
$new_user_signup = true;
|
| 406 |
+
$multisite_message = true;
|
| 407 |
+
$userdata = $this->wppb_add_custom_field_values( $global_request, $userdata, $this->args['form_fields'] );
|
| 408 |
|
| 409 |
+
if( !isset( $userdata['role'] ) )
|
| 410 |
+
$userdata['role'] = $this->args['role'];
|
| 411 |
+
|
| 412 |
+
$userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
|
|
|
|
|
|
|
| 413 |
|
| 414 |
+
if( is_multisite() ){
|
| 415 |
+
/* since version 2.0.7 add this meta so we know on what blog the user registered */
|
| 416 |
+
$userdata['registered_for_blog_id'] = get_current_blog_id();
|
| 417 |
$userdata = wp_unslash( $userdata );
|
| 418 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
|
| 420 |
+
wppb_signup_user( $userdata['user_login'], $userdata['user_email'], $userdata );
|
| 421 |
+
|
| 422 |
+
}else{
|
| 423 |
if( !isset( $userdata['role'] ) )
|
| 424 |
+
$userdata['role'] = $this->args['role'];
|
| 425 |
|
|
|
|
|
|
|
|
|
|
| 426 |
$userdata = wp_unslash( $userdata );
|
| 427 |
+
$user_id = wp_insert_user( $userdata );
|
| 428 |
+
}
|
| 429 |
|
| 430 |
}elseif( $this->args['form_type'] == 'edit_profile' ){
|
| 431 |
if( isset( $wppb_general_settings['loginWith'] ) && ( $wppb_general_settings['loginWith'] == 'email' ) ){
|
front-end/default-fields/email/email.php
CHANGED
|
@@ -49,7 +49,7 @@ function wppb_check_email_value( $message, $field, $request_data, $form_location
|
|
| 49 |
}
|
| 50 |
|
| 51 |
$wppb_generalSettings = get_option( 'wppb_general_settings' );
|
| 52 |
-
if (
|
| 53 |
$user_signup = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ".$wpdb->base_prefix."signups WHERE user_email = %s AND active=0", $request_data['email'] ) );
|
| 54 |
|
| 55 |
if ( !empty( $user_signup ) ){
|
| 49 |
}
|
| 50 |
|
| 51 |
$wppb_generalSettings = get_option( 'wppb_general_settings' );
|
| 52 |
+
if ( isset( $wppb_generalSettings['emailConfirmation'] ) && ( $wppb_generalSettings['emailConfirmation'] == 'yes' ) ){
|
| 53 |
$user_signup = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ".$wpdb->base_prefix."signups WHERE user_email = %s AND active=0", $request_data['email'] ) );
|
| 54 |
|
| 55 |
if ( !empty( $user_signup ) ){
|
front-end/default-fields/username/username.php
CHANGED
|
@@ -54,7 +54,7 @@ function wppb_check_username_value( $message, $field, $request_data, $form_locat
|
|
| 54 |
}
|
| 55 |
|
| 56 |
$wppb_generalSettings = get_option('wppb_general_settings');
|
| 57 |
-
if (
|
| 58 |
|
| 59 |
if( is_multisite() && $request_data['username'] != preg_replace( '/\s+/', '', $request_data['username'] ) ){
|
| 60 |
return __( 'This username is invalid because it uses illegal characters.', 'profile-builder' ) .'<br/>'. __( 'Please enter a valid username.', 'profile-builder' );
|
| 54 |
}
|
| 55 |
|
| 56 |
$wppb_generalSettings = get_option('wppb_general_settings');
|
| 57 |
+
if ( $wppb_generalSettings['emailConfirmation'] == 'yes' ){
|
| 58 |
|
| 59 |
if( is_multisite() && $request_data['username'] != preg_replace( '/\s+/', '', $request_data['username'] ) ){
|
| 60 |
return __( 'This username is invalid because it uses illegal characters.', 'profile-builder' ) .'<br/>'. __( 'Please enter a valid username.', 'profile-builder' );
|
front-end/login.php
CHANGED
|
@@ -14,7 +14,7 @@ function wppb_login_form_bottom( $form_part, $args ){
|
|
| 14 |
$form_part .= '<input type="hidden" name="wppb_request_url" value="'. esc_url( wppb_curpageurl() ).'"/>';
|
| 15 |
$form_part .= '<input type="hidden" name="wppb_lostpassword_url" value="'.esc_url( $args['lostpassword_url'] ).'"/>';
|
| 16 |
$form_part .= '<input type="hidden" name="wppb_redirect_priority" value="'. esc_attr( isset( $args['redirect_priority'] ) ? $args['redirect_priority'] : '' ) .'"/>';
|
| 17 |
-
|
| 18 |
}
|
| 19 |
|
| 20 |
return $form_part;
|
| 14 |
$form_part .= '<input type="hidden" name="wppb_request_url" value="'. esc_url( wppb_curpageurl() ).'"/>';
|
| 15 |
$form_part .= '<input type="hidden" name="wppb_lostpassword_url" value="'.esc_url( $args['lostpassword_url'] ).'"/>';
|
| 16 |
$form_part .= '<input type="hidden" name="wppb_redirect_priority" value="'. esc_attr( isset( $args['redirect_priority'] ) ? $args['redirect_priority'] : '' ) .'"/>';
|
| 17 |
+
$form_part .= '<input type="hidden" name="wppb_referer_url" value="'.esc_url( isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '' ).'"/>';
|
| 18 |
}
|
| 19 |
|
| 20 |
return $form_part;
|
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.2.
|
| 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.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'))));
|
| 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.2.6
|
| 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.2.6' );
|
| 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.3.1
|
| 8 |
-
Stable tag: 2.2.
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
|
@@ -115,6 +115,9 @@ 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.2.5 =
|
| 119 |
* Fixed issue that prevented the value 0 to be set as default value
|
| 120 |
* Fixed xss vulnerability
|
| 5 |
|
| 6 |
Requires at least: 3.1
|
| 7 |
Tested up to: 4.3.1
|
| 8 |
+
Stable tag: 2.2.6
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 115 |
10. Profile Builder Login Widget
|
| 116 |
|
| 117 |
== Changelog ==
|
| 118 |
+
= 2.2.6 =
|
| 119 |
+
* Email Confirmation can now be disabled on WordPress multisite
|
| 120 |
+
|
| 121 |
= 2.2.5 =
|
| 122 |
* Fixed issue that prevented the value 0 to be set as default value
|
| 123 |
* Fixed xss vulnerability
|
