• Resolved sujithgnair

    (@sujithgnair)


    The main users that are Models and Agency/Casting Users. They should be able to register and login. Models should be able to post their profile for FREE. Where in Agency/Casting Users should subscribe to any Paid Packages like One Month Package, 6 Months Package etc. Once logs in after subscription the Agency/Casting Users should be able to browse the Models Profiles and contact them till the Subscription Expires.

    I am using Paid Membership Pro plugin to achieve the same.

    The problem which i am facing is even the users who have logged in cant edit their own profile because Paid Membership Pro is Restricting Default Content of the Profiles page. ( Since i have restricted the content to only subscribed users ). How to solve this issue? Kindly pls help me with the same. Thx

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @sujithgnair

    Thank you for reaching out to Paid Memberships Pro. I’m sorry to hear about the issue you are facing.

    This sounds like you are restricting the member profile edit page to require a membership? Can you confirm if you have configured this page to require a membership in order to view it?

    By default we do not restrict this page, as we automatically redirect logged-out users away from this page if they try to access it in this state.

    Please let me know if this helps.

    Thread Starter sujithgnair

    (@sujithgnair)

    Yes, i have restricted the Profile View/ Users page. After subscribing only the agents can see other members profile. So i have restricted the Profile View/ Users page.

    I will give a brief, there are 2 types of user registrations in this site, one is the agents and others are models. Models can register for free and update their profile, for agents the models list are available to view, but agents cant view the models profile page since the agents has to be subscribed to view the models profile.

    But here in this case the Agents or Models cant view his own profile page since the system is restricting the view. Is there a way the system dont restrict their own profile view after logging in?

    Thank you in advance.

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for the feedback @sujithgnair, what plugin are you using to let users view other users profiles?

    You might need custom code to allow access to viewing their own profile regardless of their membership level. To do this, you would need to hook into the ‘pmpro_has_membership_access_filter’ (https://www.paidmembershipspro.com/hook/pmpro_has_membership_access_filter/) and check to see if the user is viewing their own profile, if they are return true, otherwise return $hasaccess.

    I hope this helps clear things up.

    Thread Starter sujithgnair

    (@sujithgnair)

    Thank You Andrew. I am not a well experienced wordpress user. So pls help me with that. You mean to say, i have to add the following script to the themes functions.php page?
    
    
    
    $hasaccess = apply_filters("pmpro_has_membership_access_filter", $hasaccess, $mypost, $myuser, $post_membership_levels);
    
    ? ? //filter for this post type
    
    ? ? if( isset($mypost->post_type) && has_filter("pmpro_has_membership_access_filter_" . $mypost->post_type))
    
    ? ? ? ? $hasaccess = apply_filters("pmpro_has_membership_access_filter_" . $mypost->post_type, $hasaccess, $mypost, $myuser, $post_membership_levels);
    
    ? ? //return
    
    ? ? if($return_membership_levels)
    
    ? ? ? ? return array($hasaccess, $post_membership_levels_ids, $post_membership_levels_names);
    
    ? ? else
    
    ? ? ? ? return $hasaccess;
    
    }
    Plugin Author Andrew Lima

    (@andrewza)

    I don’t think it’s entirely correct but you are close. You will need to integrate with your plugin that allows you to view other’s profiles (as this isn’t default functionality of Paid Memberships Pro), it might be by using a query parameter or a function (if it is available from the other plugin).

    What plugin are you using to let users view other users profiles?

    If you need help customizing your site, please reach out to a local WordPress developer or post to https://jobs.wordpress.net

    Thread Starter sujithgnair

    (@sujithgnair)

    Hi Andrew,

    Yes i understand its not entirely correct. I will try again to rectify this.

    Iam using Ultimate Member Plugin to view other user profiles.

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Users Profile page Content Restriction Issue’ is closed to new replies.