Up to 50 percent off

my admin back is blocked

This topic contains 2 reply and 2 voices, and was last updated by Alex 10 years, 11 months ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
December 12, 2013 at 4:10 am 13641
Alex I just got the plugging and install but I got blocked from accessing my back end how i can fix it, when I used the free version happen the same, please help
December 12, 2013 at 6:51 am 13644
Mahi Mahi

are you pointing to admin user? or subscribe users? There is a settings option under WPUF Settings-> Admin area access

December 12, 2013 at 10:11 pm 13663
Alex Alex

hi, I got access to back end by deleting this code below, otherwise I can not logging.. but this is not how it should be and im afraid that other user can get to the back end

—————-

/**
* Block user access to admin panel for specific roles
*
* @global string $pagenow
*/
function block_admin_access() {
global $pagenow;

// bail out if we are from WP Cli
if ( defined( ‘WP_CLI’ ) ) {
return;
}

$access_level = wpuf_get_option( ‘admin_access’, ‘wpuf_general’, ‘read’ );
$valid_pages = array(‘admin-ajax.php’, ‘async-upload.php’, ‘media-upload.php’);

if ( !current_user_can( $access_level ) && !in_array( $pagenow, $valid_pages ) ) {
wp_die( __( ‘Access Denied. Your site administrator has blocked your access to the WordPress back-office.’, ‘wpuf’ ) );
}
}
———————

Viewing 2 Posts - 1 through 2 (of 2 total)