-
alex1971
MemberThanks, I’ll look forward to
-
alex1971
MemberI would be very grateful to you to help with such a function that checks the access rights for the user and skip user with role administrator and moderator
Thanks
-
alex1971
MemberYes, and for correct work plugin I use the following construction [b]function_exists [‘is_bbpress’] && bbp_is_single_forum [][/b] and that is works only in site section where the forum is
anyway this working for me correctly
if ( ! is_current_user_skip_protect( $user_id ) ) {
get_template_part( ‘templates/secondary/secondary’, ‘bbp’ );
} -
alex1971
MemberAs I understand it uses envato api and checks from the forum database a users data – I think it should work anywhere! Especially I did not replace the plugin files on the other files – I just want to get through your plugin checks the current user’s access rights to the forum ( true or false ), and on this basis to exclude or include the template parts (header, sidebar, footer)
-
alex1971
MemberWhy is that? For example here this works:
function is_current_user_skip_protect( $type, $forum_id = 0 ) {
global $sbv_core_bbpress;
$sbv_bbpress = new sbv_bbpress();
$user_id = get_current_user_id();
$skip = sbv_is_current_user_with_role( $sbv_bbpress->get( ‘access_unrestriced_user_roles’ ) );
$skip = apply_filters( ‘sbv_skip_protect_check_’ . $type, $skip, $user_id );
if ( ! $skip ) {
return true;
} else {
return false;
}
}and
if ( ! is_current_user_skip_protect( $user_id ) ) {
get_template_part( ‘templates/secondary/secondary’, ‘bbp’ );
} -
alex1971
MemberHi,
I looked up and found in plug-in code that implements the function of what I mean, [b]function “check”[/b] in [b]”core/bbpress.php”[/b], as I understand it is implemented by means of checking [b]$user_id = get_current_user_id [];[/b] checking current user has access to the forum or not and also skips checking for administrators and moderators – I understand this correctly?
Alexander
-
alex1971
MemberIn the new version of the plugin the two files are still not work: nverify-user-profile-bulk.php and nverify-user-profile-list.php are used from the folder plug-in
-
alex1971
Member -
alex1971
MemberI understand that your plugin uses the bbpress contents template, so I gave as an example the boolean function analogy “is_user_logged_in()”
maybe like this:
if ( is_user_access_forum() ) {
echo show header content;
echo show secondary content;
echo show footer content;
} else {
echo ”;
}eg i used
if ( is_user_logged_in() ) :
do_action( ‘footer_content’ );
endif;
-
alex1971
MemberWhat permissions are necessary to checked from list below for your plug-in?
View and search Envato sites
View your Envato Account username
View your email address
View your name, location and account balance
View your account financial history
Download the items you’ve purchased
View your items’ sales history
Verify purchases of your items
Verify purchases you’ve made
View your purchases of the app creator’s items
View your public and private collections -
alex1971
MemberHi,
I mean that on page was only the form for enter the purchase code like as “snapshot2″ [attachment file=”snapshot2.png”] and not like “snapshot1″ [attachment file=”snapshot1.png”]
Alexander
-
alex1971
MemberHi,
Two files:
nverify-user-profile-bulk.php
nverify-user-profile-list.phpare used from the folder plug-in
Alexander
