User registration & user profile – Profile Builder - Version 2.6.5

Version Description

  • Fixed an issue where certain users could view the Roles Editor page without permission
  • Changed the strings in Recover Password accordingly with the option set in 'Allow Users to Log in With' setting
Download this release

Release Info

Developer iova.mihai
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 2.6.5
Comparing to
See all releases

Code changes from version 2.6.4 to 2.6.5

features/roles-editor/roles-editor.php CHANGED
@@ -235,37 +235,39 @@ class WPPB_Roles_Editor {
235
 
236
  function create_roles_editor_cpt(){
237
 
238
- $labels = array(
239
- 'name' => esc_html__( 'Roles Editor', 'profile-builder' ),
240
- 'singular_name' => esc_html__( 'Roles Editor', 'profile-builder' ),
241
- 'add_new' => esc_html__( 'Add New Role', 'profile-builder' ),
242
- 'add_new_item' => esc_html__( 'Add New Role', 'profile-builder' ),
243
- 'edit_item' => esc_html__( 'Edit Role', 'profile-builder' ),
244
- 'new_item' => esc_html__( 'New Role', 'profile-builder' ),
245
- 'all_items' => esc_html__( 'Roles Editor', 'profile-builder' ),
246
- 'view_item' => esc_html__( 'View Role', 'profile-builder' ),
247
- 'search_items' => esc_html__( 'Search the Roles Editor', 'profile-builder' ),
248
- 'not_found' => esc_html__( 'No roles found', 'profile-builder' ),
249
- 'not_found_in_trash' => esc_html__( 'No roles found in trash', 'profile-builder' ),
250
- 'name_admin_bar' => esc_html__( 'Role', 'profile-builder' ),
251
- 'parent_item_colon' => '',
252
- 'menu_name' => esc_html__( 'Roles Editor', 'profile-builder' )
253
- );
 
254
 
255
- $args = array(
256
- 'labels' => $labels,
257
- 'public' => false,
258
- 'publicly_queryable' => false,
259
- 'show_ui' => true,
260
- 'query_var' => true,
261
- 'show_in_menu' => 'users.php',
262
- 'has_archive' => false,
263
- 'hierarchical' => false,
264
- 'capability_type' => 'post',
265
- 'supports' => array( 'title' )
266
- );
267
 
268
- register_post_type( 'wppb-roles-editor', $args );
 
269
 
270
  }
271
 
235
 
236
  function create_roles_editor_cpt(){
237
 
238
+ if( is_admin() && current_user_can( 'manage_options' ) ) {
239
+ $labels = array(
240
+ 'name' => esc_html__( 'Roles Editor', 'profile-builder' ),
241
+ 'singular_name' => esc_html__( 'Roles Editor', 'profile-builder' ),
242
+ 'add_new' => esc_html__( 'Add New Role', 'profile-builder' ),
243
+ 'add_new_item' => esc_html__( 'Add New Role', 'profile-builder' ),
244
+ 'edit_item' => esc_html__( 'Edit Role', 'profile-builder' ),
245
+ 'new_item' => esc_html__( 'New Role', 'profile-builder' ),
246
+ 'all_items' => esc_html__( 'Roles Editor', 'profile-builder' ),
247
+ 'view_item' => esc_html__( 'View Role', 'profile-builder' ),
248
+ 'search_items' => esc_html__( 'Search the Roles Editor', 'profile-builder' ),
249
+ 'not_found' => esc_html__( 'No roles found', 'profile-builder' ),
250
+ 'not_found_in_trash' => esc_html__( 'No roles found in trash', 'profile-builder' ),
251
+ 'name_admin_bar' => esc_html__( 'Role', 'profile-builder' ),
252
+ 'parent_item_colon' => '',
253
+ 'menu_name' => esc_html__( 'Roles Editor', 'profile-builder' )
254
+ );
255
 
256
+ $args = array(
257
+ 'labels' => $labels,
258
+ 'public' => false,
259
+ 'publicly_queryable' => false,
260
+ 'show_ui' => true,
261
+ 'query_var' => true,
262
+ 'show_in_menu' => 'users.php',
263
+ 'has_archive' => false,
264
+ 'hierarchical' => false,
265
+ 'capability_type' => 'post',
266
+ 'supports' => array( 'title' )
267
+ );
268
 
269
+ register_post_type( 'wppb-roles-editor', $args );
270
+ }
271
 
272
  }
273
 
front-end/recover.php CHANGED
@@ -111,14 +111,22 @@ function wppb_create_recover_password_form( $user, $post_data ){
111
  ?>
112
  <form enctype="multipart/form-data" method="post" id="wppb-recover-password" class="wppb-user-forms" action="<?php echo esc_url( add_query_arg( 'submitted', 'yes', wppb_curpageurl() ) ); ?>">
113
  <?php
114
- $recover_notification = '<p>' . __( 'Please enter your username or email address.', 'profile-builder' );
 
 
 
 
 
 
 
 
 
 
115
  $recover_notification .= '<br/>'.__( 'You will receive a link to create a new password via email.', 'profile-builder' ).'</p>';
116
  echo apply_filters( 'wppb_recover_password_message1', $recover_notification );
117
 
118
  $username_email = ( isset( $post_data['username_email'] ) ? $post_data['username_email'] : '' );
119
 
120
- $username_email_label = __( 'Username or E-mail', 'profile-builder' );
121
-
122
  $recover_input = '<ul>
123
  <li class="wppb-form-field wppb-username-email">
124
  <label for="username_email">'. $username_email_label .'</label>
111
  ?>
112
  <form enctype="multipart/form-data" method="post" id="wppb-recover-password" class="wppb-user-forms" action="<?php echo esc_url( add_query_arg( 'submitted', 'yes', wppb_curpageurl() ) ); ?>">
113
  <?php
114
+ $wppb_generalSettings = get_option( 'wppb_general_settings' );
115
+
116
+ if( !empty( $wppb_generalSettings['loginWith'] ) && $wppb_generalSettings['loginWith'] == 'email' ){
117
+ $recover_notification = '<p>' . __( 'Please enter your email address.', 'profile-builder' );
118
+ $username_email_label = __( 'E-mail', 'profile-builder' );
119
+ }
120
+ else{
121
+ $recover_notification = '<p>' . __( 'Please enter your username or email address.', 'profile-builder' );
122
+ $username_email_label = __( 'Username or E-mail', 'profile-builder' );
123
+ }
124
+
125
  $recover_notification .= '<br/>'.__( 'You will receive a link to create a new password via email.', 'profile-builder' ).'</p>';
126
  echo apply_filters( 'wppb_recover_password_message1', $recover_notification );
127
 
128
  $username_email = ( isset( $post_data['username_email'] ) ? $post_data['username_email'] : '' );
129
 
 
 
130
  $recover_input = '<ul>
131
  <li class="wppb-form-field wppb-username-email">
132
  <label for="username_email">'. $username_email_label .'</label>
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: https://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.6.4
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
8
  Author URI: https://www.cozmoslabs.com/
9
  License: GPL2
@@ -73,7 +73,7 @@ function wppb_free_plugin_init() {
73
  *
74
  *
75
  */
76
- define('PROFILE_BUILDER_VERSION', '2.6.4' );
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: https://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.6.5
7
  Author: Cozmoslabs, Madalin Ungureanu, Antohe Cristian, Barina Gabriel, Mihai Iova
8
  Author URI: https://www.cozmoslabs.com/
9
  License: GPL2
73
  *
74
  *
75
  */
76
+ define('PROFILE_BUILDER_VERSION', '2.6.5' );
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
@@ -1,11 +1,10 @@
1
- === User registration & user profile - Profile Builder ===
2
  Contributors: cozmoslabs, reflectionmedia, sareiodata, adispiac, madalin.ungureanu, iova.mihai, barinagabriel
3
  Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
4
  Tags: user registration, user profile, user registration form, user fields, extra user fields, edit profile, user custom fields, front-end login, front-end edit profile, front-end user registration, email confirmation, login form
5
-
6
  Requires at least: 3.1
7
- Tested up to: 4.7.5
8
- Stable tag: 2.6.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -154,6 +153,10 @@ This plugin adds/removes user fields in the front-end. Both default and extra pr
154
  12. Role Editor
155
 
156
  == Changelog ==
 
 
 
 
157
  = 2.6.4 =
158
  * Fixed a bug which was preventing deleting thrashed posts
159
  * Compatibility fixes with Advanced Custom Fields Plugin
1
+ === User registration & user profile - Profile Builder ===
2
  Contributors: cozmoslabs, reflectionmedia, sareiodata, adispiac, madalin.ungureanu, iova.mihai, barinagabriel
3
  Donate link: http://www.cozmoslabs.com/wordpress-profile-builder/
4
  Tags: user registration, user profile, user registration form, user fields, extra user fields, edit profile, user custom fields, front-end login, front-end edit profile, front-end user registration, email confirmation, login form
 
5
  Requires at least: 3.1
6
+ Tested up to: 4.8
7
+ Stable tag: 2.6.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
153
  12. Role Editor
154
 
155
  == Changelog ==
156
+ = 2.6.5 =
157
+ * Fixed an issue where certain users could view the Roles Editor page without permission
158
+ * Changed the strings in Recover Password accordingly with the option set in 'Allow Users to Log in With' setting
159
+
160
  = 2.6.4 =
161
  * Fixed a bug which was preventing deleting thrashed posts
162
  * Compatibility fixes with Advanced Custom Fields Plugin