• Resolved byzdata

    (@byzdata)


    Hello.
    I found this plugin and has worked like a charm, to restrict specific pages and post to a specific roles. Great!

    Now I would like to have add another restriction.
    Let me explain the issue.
    I am using Sportspress plugin to manage a sportleague.
    They have a CPT defined as “player” (slug as <domain-name>/player/<player-name>) where player′s profile is shown.
    One plugin′s functionality is to assigned registered users to a player profile (see this https://www.themeboy.com/blog/how-to-allow-wordpress-user-registration-and-assign-sportspress-roles/)

    So, the restriction I would like to have is: Only logged-in users can access only their player profiles (CPT players) not any other profile.
    I checked that under Members′s tab, I can Synchronized those Logged-in, now the idea is to restrict those logged-in user to, I don′t know if Player o Author, but I would need another condition like “user name match profile name”

    Let me know what you think.
    Have you had a similar request like this?
    What configurations do you recommend to achieve this?

    Thanks in advanced.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Apologies for the delayed response here.

    So if I understand it correctly, a logged-in user should only be able to view their own player profile? Unfortunately this is not supported out of the box.

    One thing that could work is if Sportspress has a specific link to the logged-in users own profile, such as <domain-name>/player/my-profile. That would be fully supported by the premium URL Restriction add-on. Please reach out via https://dev.institute/contact/ for any questions about add-ons.

    Thread Starter byzdata

    (@byzdata)

    Hello Joachim Jensen @intoxstudio
    Thanks for the reply. (I was waiting for this response)

    As you mentioned, Sportspress does specify a link for players, the way you indicated <domain-name>/player/<slug>, being that the permalink for an specific player. (you can see an example here (https://ultiranks.com/player/silver-surfer/)

    That slug is assigned by me, when player′s team are imported into the platform.
    User registration is also allow by the plugin (as a WordPress core functionality).
    Later, I could assign a registered user to his/her player profile.

    So after complete what I mentioned above, the final scenario would be:
    if a player/user wants to go to his/her profile (through the link <domain-name>/player/<slug> must be logged-in. So, the challenge is to find how to restrict that scenario.

    You mentioned premium URL Restriction add-on. Where can I read about it?

    Thanks you.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only logged-in users can access only their player profiles (CPT players) not any’ is closed to new replies.