Redirect non logged in user and subscriber
-
Hello Nahid :),
I have created a Custom Profile Menu under the url
https://www.mydomain.com/members/username/mymenu/
But this page is actually public.
I would like to make this page private for each user, and only for users that are above the role of subscriber.
Exactly the same way the url
https://www.mydomain.com/members/username/settings/
behaves for each user, when they try to access someone elses same type of page.For example=>
For non logged in users, trying to have access to the page, redirects them to login page.
For subscribers, they shouldn’t have access to this page related with their profile or someone elses profile.
For above roles(lower than admin), they should have access only to their profile and no one elses profile.
For admins, could have access to everybodys profile.I have tried to use condition
if(!is_user_logged_in() && bp_is_current_component( $bp->members->mymenu))
but didn’t seem to work.Would it be possible to give me a help on this?
Thank you very much for your time.
- The topic ‘Redirect non logged in user and subscriber’ is closed to new replies.