diff --git a/includes/core/um-actions-core.php b/includes/core/um-actions-core.php index 2c85e9cb..70865693 100644 --- a/includes/core/um-actions-core.php +++ b/includes/core/um-actions-core.php @@ -25,9 +25,9 @@ function um_action_request_process() { } } - if ( isset( $_REQUEST['um_action'] ) && $_REQUEST['um_action'] != "edit" && ! current_user_can( 'edit_users' ) ) { - wp_die( __( 'You do not have enough permissions to do that.','ultimate-member') ); - } +// if ( isset( $_REQUEST['um_action'] ) && $_REQUEST['um_action'] != "edit" && ! current_user_can( 'edit_users' ) ) { +// wp_die( __( 'You do not have enough permissions to do that.','ultimate-member') ); +// } if ( isset( $_REQUEST['uid'] ) ) { $uid = $_REQUEST['uid']; diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index 803a3e88..e8efb2fd 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -1059,7 +1059,7 @@ function um_add_edit_icon( $args ) { if (!is_user_logged_in()) return; // not allowed for guests - if (isset( UM()->user()->cannot_edit ) && UM()->user()->cannot_edit == 1) return; // do not proceed if user cannot edit + // do not proceed if user cannot edit if (UM()->fields()->editing == true) { @@ -1071,91 +1071,91 @@ function um_add_edit_icon( $args ) { - + roles()->um_current_user_can( 'edit', um_profile_id() ) || UM()->roles()->um_current_user_can( 'delete', um_profile_id() ) ) ) { -