Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount! Get 20% off now with code SPOOKY-2024!

How user can unsubscribe in Community Builder ?

  • fduchesne
  • fduchesne
  • OFFLINE
  • Posts: 30
  • Thanks: 4
  • Karma: 0
11 years 9 months ago #218178 by fduchesne
Hello,

Question is simple, in community builder how my members can unsubscribe themselves ?

Thanks for your help.

Best Regards.

Fred

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago - 11 years 9 months ago #218200 by krileon
Disable their profiles or delete their profiles? CB has no such feature, but believe there's a plugin called CB Delete Me that can do this. You could also use CB Auto Actions to react to a checkbox field after profile update to set them as blocked if the checkbox is checked.


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.
Last edit: 11 years 9 months ago by krileon.

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

  • fduchesne
  • fduchesne
  • OFFLINE
  • Posts: 30
  • Thanks: 4
  • Karma: 0
11 years 9 months ago #218270 by fduchesne
Thanks for your response.

I try with CB Auto Actions to react to a checkbox OnAfterProfileUpdate to block user, but I don't find Block user option in Type...

Did I need to do a query directly to Database ? or there is another way ?

Thanks for your feedback.

Fred

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago - 11 years 9 months ago #218273 by krileon
You'll need to do a database query to _users database table in a query action. Example as follows.

Trigger: onAfterUserUpdate
Conditional: [cb_checkbox] Equal To 1
Query:
Code:
UPDATE `#__users` SET `block` = 1 WHERE `id` = '[user_id]'

You'll probably want a second action directly after this one that uses the same trigger and conditional that logs them out (use login/logout action).


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.
Last edit: 11 years 9 months ago by krileon.

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

  • fduchesne
  • fduchesne
  • OFFLINE
  • Posts: 30
  • Thanks: 4
  • Karma: 0
11 years 9 months ago #218282 by fduchesne
It's working fine and with two trigger, first one to block user, then to logout the user.

Last question around this, if I want a alert message (javascript for example) when the user check the box and before to save the profile, can I use CB Action or another things ?

Many Thanks.

Fred

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48454
  • Thanks: 8280
  • Karma: 1443
11 years 9 months ago #218310 by krileon
You could use the before profile edit display trigger and add jQuery or JS to the header using a Code action to alter them when the checkbox is altered if you wanted. You could also just add a delimiter field that is above the checkbox that explains its usage and purpose.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum