User profile edit but not show to other users

10 years 3 months ago #239636 by resolute
Hi I need some help with the following issue.

A logged in user can edit the user id in a url to view anyother user profile e.g the URL below:

index.php?option=com_comprofiler&task=userprofile&user=1479&Itemid=218

I would like to restrict this so that only the logged in users can view their own profiles.

I have also checked the forum and there was a solution to that by using auto action below is the solution mentioned but it doesnt work. After I do that no one can view their profile, please advise.

Type: Redirect
Triggers: onBeforeUserProfileRequest
Access: Everybody
Conditional 1: [get_user] Is Not Empty
Conditional 2: [get_user] Not Equal To [user_id]
URL: index.php?option=com_comprofiler

Please Log in to join the conversation.

10 years 3 months ago #239652 by krileon
Replied by krileon on topic User profile edit but not show to other users
That redirect action should work, but you need to set "User" to "User" so it uses the viewing users user object for [user_id] instead of the one pulled from the trigger.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.187 seconds

Facebook Twitter LinkedIn