diff --git a/includes/core/class-password.php b/includes/core/class-password.php index 5ef2d47e..b3bc6e17 100644 --- a/includes/core/class-password.php +++ b/includes/core/class-password.php @@ -277,8 +277,11 @@ if ( ! class_exists( 'um\core\Password' ) ) { } if ( um_is_core_page( 'password-reset' ) && isset( $_REQUEST['act'] ) && $_REQUEST['act'] == 'reset_password' ) { + wp_fix_server_vars(); + list( $rp_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) ); $rp_cookie = 'wp-resetpass-' . COOKIEHASH; + if ( isset( $_GET['hash'] ) ) { $userdata = get_userdata( wp_unslash( $_GET['user_id'] ) ); if ( ! $userdata || is_wp_error( $userdata ) ) { diff --git a/includes/core/class-roles-capabilities.php b/includes/core/class-roles-capabilities.php index 580388b1..8aefd485 100644 --- a/includes/core/class-roles-capabilities.php +++ b/includes/core/class-roles-capabilities.php @@ -592,7 +592,7 @@ if ( ! class_exists( 'um\core\Roles_Capabilities' ) ) { um_fetch_user( get_current_user_id() ); - $current_user_roles = UM()->roles()->get_all_user_roles( $user_id ); + $current_user_roles = $this->get_all_user_roles( $user_id ); switch( $cap ) { case 'edit': diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 3b470330..4d39a476 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -2131,7 +2131,7 @@ function um_get_default_cover_uri() { * @param $data * @param null $attrs * - * @return string + * @return string|array */ function um_user( $data, $attrs = null ) { diff --git a/templates/members-grid.php b/templates/members-grid.php index f65c0047..91467dab 100644 --- a/templates/members-grid.php +++ b/templates/members-grid.php @@ -60,9 +60,11 @@ */ do_action( 'um_members_just_after_name', um_user('ID'), $args ); ?> - roles()->um_current_user_can( 'edit', um_user('ID') ) || UM()->roles()->um_user_can( 'can_edit_everyone' ) ) { ?> + roles()->um_current_user_can( 'edit', um_user('ID') ) ) { ?>
- + + +