Skip to Content Skip to Menu

[SOLVED] View of a profile depending on user's subscription (CB Auto Actions related)

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
10 years 7 months ago - 10 years 6 months ago #243514 by ricco1
Hi Kyle,

I'm not gonna ask you how are you, because you never answer this question :) .

From my search around I've learned that hiding a user's profile depending on the viewer's subscription is only possible through CB Auto Actions, which to me is like "a mist through a forest". :unsure:

This time I'm trying to achieve the following:

Hopefully you remember, from my other topics, I have user groups: 1. Free members (e.g. ID 13), 2. VIP members (e.g. ID 14).

I also have user groups: 3. Moderators (e.g. ID 15) and 4. Super Users (e.g. ID 16).

I'm trying to create a CB Auto Action so that the Free members cannot see the rest of the member's profiles. Free members need to pay to become VIP and see profiles.

What are the right CB Auto Actions settings please?

I've tried the bellow, with no success:

Type: Redirect
Trigger: onBeforeUserProfileDisplay
User: Automatic
Access: Everybody
Conditional 1: [gid] Equal To 13
URL: index.php?option=com_comprofiler

Thank you
All the best
Ricco
Last edit: 10 years 6 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • danbo1972
  • danbo1972
  • OFFLINE
  • Posts: 88
  • Thanks: 22
  • Karma: 4
10 years 6 months ago #243552 by danbo1972
Is there a reason you're trying to do this with an auto action? This can be done in CB configuration by changing the access level of the user group VIP, from public to VIP. This allows VIP and all groups higher than them to access their profiles but not your free members or guests.
I've included a screen shot.
Hope this helps.
Attachments:

Please Log in or Create an account to join the conversation.

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
10 years 6 months ago #243555 by ricco1
Good morning,

This was what I've done in the first place and what was until now, but with this configuration the Free members cannot edit their profiles.

Thank you
Have a nice day

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #243578 by krileon
Don't try to condition the access in the conditional as it won't work well. Gid is only valid if the user has a single usergroup and we only kept it for backwards compatibility. Gids contains an array of all the users groups, but it's not easy to match against it. Instead use the below usage.

Type: Redirect
Trigger: onBeforeUserProfileDisplay
User: User
Access: Select Usergroup Here
Conditional 1: [var1_id] Not Equal To [user_id]
URL: index.php?option=com_comprofiler

The conditional checks if the user being displayed is not the users self as you don't want to get stuck in an infinite loop when the user views themselves.


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 or Create an account to join the conversation.

  • ricco1
  • ricco1
  • OFFLINE
  • Posts: 310
  • Thanks: 8
  • Karma: -7
10 years 6 months ago - 10 years 6 months ago #243610 by ricco1
Magically it works.

You are the best.

Thank you
Last edit: 10 years 6 months ago by ricco1.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum