Ultimate Member – User Profile & Membership Plugin - Version 1.3.71

Version Description

Download this release

Release Info

Developer champsupertramp
Plugin Icon 128x128 Ultimate Member – User Profile & Membership Plugin
Version 1.3.71
Comparing to
See all releases

Code changes from version 1.3.70 to 1.3.71

admin/core/um-admin-actions.php CHANGED
@@ -4,14 +4,14 @@
4
*** @Add community role to user creatino page
5
***/
6
add_action('admin_footer_text', 'um_add_custom_user_profile_fields');
7
- function um_add_custom_user_profile_fields() {
8
global $ultimatemember, $pagenow;
9
10
if( $pagenow !== 'user-new.php' )
11
- return;
12
13
if( !current_user_can('manage_options') )
14
- return false;
15
16
?>
17
<table id="table_my_custom_field" style="display:none;">
4
*** @Add community role to user creatino page
5
***/
6
add_action('admin_footer_text', 'um_add_custom_user_profile_fields');
7
+ function um_add_custom_user_profile_fields($footer_text) {
8
global $ultimatemember, $pagenow;
9
10
if( $pagenow !== 'user-new.php' )
11
+ return $footer_text;
12
13
if( !current_user_can('manage_options') )
14
+ return $footer_text;
15
16
?>
17
<table id="table_my_custom_field" style="display:none;">
core/um-fields.php CHANGED
@@ -2255,8 +2255,12 @@ class UM_Fields {
2255
if ( isset( $data['label'] ) ) {
2256
$output .= $this->field_label($label, $key, $data);
2257
}
2258
2259
- $res = stripslashes( $this->field_value( $key, $default, $data ) );
2260
2261
$res = apply_filters("um_view_field_value_{$type}", $res, $data );
2262
2255
if ( isset( $data['label'] ) ) {
2256
$output .= $this->field_label($label, $key, $data);
2257
}
2258
+
2259
+ $res = $this->field_value( $key, $default, $data );
2260
2261
+ if( ! empty( $res ) ){
2262
+ $res = stripslashes( $res );
2263
+ }
2264
2265
$res = apply_filters("um_view_field_value_{$type}", $res, $data );
2266
core/um-form.php CHANGED
@@ -124,7 +124,7 @@ class UM_Form {
124
$role = current( $_POST['role'] );
125
}
126
127
- if ( isset( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) {
128
wp_die( __( 'This is not possible for security reasons.','ultimatemember') );
129
}
130
@@ -136,7 +136,7 @@ class UM_Form {
136
$this->post_form['role'] = $role;
137
$this->post_form['submitted']['role'] = $role;
138
}
139
-
140
141
if ( isset( $_POST[ $ultimatemember->honeypot ] ) && $_POST[ $ultimatemember->honeypot ] != '' ){
142
wp_die('Hello, spam bot!');
@@ -227,19 +227,19 @@ class UM_Form {
227
function assigned_role( $post_id ){
228
229
$mode = $this->form_type( $post_id );
230
- $use_globals = get_post_meta( $post_id, "_um_{mode}_use_globals", true);
231
232
$global_role = um_get_option('default_role'); // Form Global settings
233
234
if( $use_globals == 0 ){ // Non-Global settings
235
- $role = get_post_meta( $post_id, "_um_{mode}_role", true );
236
}
237
238
- if( ! $role || $role == 0 ){ // custom role is default, return default role's slug
239
$role = $global_role;
240
}
241
-
242
- return $role;
243
244
}
245
124
$role = current( $_POST['role'] );
125
}
126
127
+ if ( isset( $custom_field_roles ) && is_array( $custom_field_roles ) && ! in_array( $role , $custom_field_roles ) ) {
128
wp_die( __( 'This is not possible for security reasons.','ultimatemember') );
129
}
130
136
$this->post_form['role'] = $role;
137
$this->post_form['submitted']['role'] = $role;
138
}
139
+
140
141
if ( isset( $_POST[ $ultimatemember->honeypot ] ) && $_POST[ $ultimatemember->honeypot ] != '' ){
142
wp_die('Hello, spam bot!');
227
function assigned_role( $post_id ){
228
229
$mode = $this->form_type( $post_id );
230
+ $use_globals = get_post_meta( $post_id, "_um_{$mode}_use_globals", true);
231
232
$global_role = um_get_option('default_role'); // Form Global settings
233
234
if( $use_globals == 0 ){ // Non-Global settings
235
+ $role = get_post_meta( $post_id, "_um_{$mode}_role", true );
236
}
237
238
+ if( empty( $role ) ){ // custom role is default, return default role's slug
239
$role = $global_role;
240
}
241
+
242
+ return $role;
243
244
}
245
core/um-members.php CHANGED
@@ -155,7 +155,7 @@ class UM_Members {
155
156
$query_args['number'] = $profiles_per_page;
157
158
- $members_page = isset($_REQUEST['members_page']) ? $_REQUEST['members_page'] : 1;
159
160
$query_args['paged'] = $members_page;
161
@@ -165,7 +165,7 @@ class UM_Members {
165
166
$array['total_users'] = (isset( $max_users ) && $max_users && $max_users <= $users->total_users ) ? $max_users : $users->total_users;
167
168
- $array['page'] = $members_page;
169
170
$array['total_pages'] = ceil( $array['total_users'] / $profiles_per_page );
171
155
156
$query_args['number'] = $profiles_per_page;
157
158
+ $members_page = isset( $_REQUEST['members_page'] ) ? $_REQUEST['members_page'] : 1;
159
160
$query_args['paged'] = $members_page;
161
165
166
$array['total_users'] = (isset( $max_users ) && $max_users && $max_users <= $users->total_users ) ? $max_users : $users->total_users;
167
168
+ $array['page'] = ! isset( $_REQUEST['members_page'] ) && isset( $args['page'] ) ? $args['page'] : $members_page;
169
170
$array['total_pages'] = ceil( $array['total_users'] / $profiles_per_page );
171
core/um-password.php CHANGED
@@ -29,7 +29,9 @@ class UM_Password {
29
30
um_fetch_user( $user_id );
31
32
- if ( $_REQUEST['hash'] != um_user('reset_pass_hash') ) wp_die( __('This is not a valid hash, or it has expired.','ultimatemember') );
33
34
$ultimatemember->user->profile['reset_pass_hash_token'] = current_time( 'timestamp' );
35
$ultimatemember->user->update_usermeta_info('reset_pass_hash_token');
@@ -50,6 +52,10 @@ class UM_Password {
50
51
if ( !um_user('reset_pass_hash') ) return false;
52
53
$url = add_query_arg( 'act', 'reset_password', um_get_core_page('password-reset') );
54
$url = add_query_arg( 'hash', esc_attr( um_user('reset_pass_hash') ), $url );
55
$url = add_query_arg( 'user_id', esc_attr( um_user('ID') ), $url );
29
30
um_fetch_user( $user_id );
31
32
+ if ( $_REQUEST['hash'] != um_user('reset_pass_hash') ){
33
+ wp_die( __('This is not a valid hash, or it has expired.','ultimatemember') );
34
+ }
35
36
$ultimatemember->user->profile['reset_pass_hash_token'] = current_time( 'timestamp' );
37
$ultimatemember->user->update_usermeta_info('reset_pass_hash_token');
52
53
if ( !um_user('reset_pass_hash') ) return false;
54
55
+ $user_id = um_user('ID');
56
+
57
+ delete_option( "um_cache_userdata_{$user_id}" );
58
+
59
$url = add_query_arg( 'act', 'reset_password', um_get_core_page('password-reset') );
60
$url = add_query_arg( 'hash', esc_attr( um_user('reset_pass_hash') ), $url );
61
$url = add_query_arg( 'user_id', esc_attr( um_user('ID') ), $url );
index.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
6
- Version: 1.3.70
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
Text Domain: ultimatemember
3
Plugin Name: Ultimate Member
4
Plugin URI: http://ultimatemember.com/
5
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
6
+ Version: 1.3.71
7
Author: Ultimate Member
8
Author URI: http://ultimatemember.com/
9
Text Domain: ultimatemember
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
7
Requires at least: 4.1
8
Tested up to: 4.6.1
9
10
- Stable Tag: 1.3.70
11
12
License: GNU Version 2 or Any Later Version
13
@@ -149,6 +149,16 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
149
150
== Changelog ==
151
152
= 1.3.70: September 09, 2016 =
153
154
* Enhancements:
@@ -156,7 +166,7 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
156
* `um_user_cover_photo_uri__filter`
157
* Bugfixes:
158
* Fixes a bug to allow users change their password in account form
159
-
160
161
= 1.3.69: September 08, 2016 =
162
7
Requires at least: 4.1
8
Tested up to: 4.6.1
9
10
+ Stable Tag: 1.3.71
11
12
License: GNU Version 2 or Any Later Version
13
149
150
== Changelog ==
151
152
+ = 1.3.71: September 12, 2016 =
153
+
154
+ * Enhancements:
155
+ * Adds a new filter hook to modify the `cover photo` uri.
156
+ * `um_user_cover_photo_uri__filter`
157
+ * Bugfixes:
158
+ * Fixes a bug to allow users change their password in account form
159
+ * Fixes a bug to allow role validation and assigning of roles to users on registration process
160
+ * Fixes a bug to avoid blank admin footer text all around WordPress
161
+
162
= 1.3.70: September 09, 2016 =
163
164
* Enhancements:
166
* `um_user_cover_photo_uri__filter`
167
* Bugfixes:
168
* Fixes a bug to allow users change their password in account form
169
+ * Fixes a bug to reset passwords
170
171
= 1.3.69: September 08, 2016 =
172