sankova
Forum Replies Created
-
Hi (@champsupertramp),
The issue was solved with the help of Ultimate Member support.
Just add add the code to the file functions.php in the active theme directory./**
* Add capability ‘manage_options’ dynamically when user retrieves information for the popup “Review Registration Details”
* @author Ultimate Member support <[email protected]>
* @since 2021-11-21
* @see #56270
*/
add_filter( ‘user_has_cap’, function( $allcaps, $caps, $args, $WP_User ) {
if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX && in_array( ‘manage_options’, $caps ) ) {$nonce = isset( $_REQUEST[‘nonce’] ) ? sanitize_text_field( $_REQUEST[‘nonce’] ) : ”;
$action = isset( $_REQUEST[‘action’] ) ? sanitize_key( $_REQUEST[‘action’] ) : ”;
$act_id = isset( $_REQUEST[‘act_id’] ) ? sanitize_key( $_REQUEST[‘act_id’] ) : ”;
$profile_id = isset( $_REQUEST[‘arg1’] ) ? absint( $_REQUEST[‘arg1’] ) : 0;if ( wp_verify_nonce( $nonce, ‘um-admin-nonce’ ) && ‘um_dynamic_modal_content’ === $action && ‘um_admin_review_registration’ === $act_id && um_can_view_profile( $profile_id ) ) {
$allcaps[‘manage_options’] = 1;
}
}
return $allcaps;
}, 20, 4 );Regards,
Hi,
The issue is solved.
Thanks.Regards,
Hi, @champsupertramp
Failed to load resource: the server responded with a status of 503 () admin-ajax.php:1
POST https://arthub.bg/wp-admin/admin-ajax.php 503 jquery.min.js?ver=3.6.0:2Regards,
- This reply was modified 3 years ago by sankova.
Hi, @champsupertramp
Thanks for the video.
I think I’m following the same steps.
Here is my video link https://www.loom.com/share/9edc3916ac404fe5a7ecc78c67b8f5deRegards,
Hi, @champsupertramp
Only this role is assignet.
Regards,Hi, @champsupertramp
I try this loggin whit user role id um_arthub-admin, the Info windos is empty.
Regards,
Hi @champsupertramp,
Yes, that is the role.
I tray the new code without success.Regards,
- This reply was modified 3 years ago by sankova.
Hi @champsupertramp,
with this code and the role with ckecked “manage_options”, don’t show a data in Info.Hi @champsupertramp,
Yes, I replaced, the problem persists.
Hi @champsupertramp,
Now dont have Error, but when I puch “Info” the Review Registration Details Windows opened and show the load icon only, no fetch data.
Hi @champsupertramp,
I put the code in functions.php, but the site is down. The error is: 503 SERVICE UNAVAILABLE
Unable to connect to PHP-FPM backend or maximum number of processes reached.Regards,
Hi @champsupertramp,
When I logged as an wp-administrator, the information in Review Registration Details Form is correct.
I create a User role in UM with the following: Administrative Permission and WP Capabilities (edit_users, read, list_users, remove_users, promote_users). In the WP-Administrator the user with this role show only the user list and only the “Info” isn’t correct. When in WP Capabilities I check and “manage_options”, the view Registration Details Form is correct, but in WP-Administrator the user has access to other WP-menus, no only to user list.Regards,
I changed the code but the problem exist. The Form is empty.
- This reply was modified 3 years ago by sankova.