[SOLVED] Setting email privacy with Auto action

12 years 3 months ago - 12 years 2 months ago #189196 by adop
Email field privacy is set to Normal CB settings in order not to have it displayed in the registration module.
I would like to set it to Visible for direct connections for all users.
I understand I should use trigger OnAfterRegistration but it is not clear how to set param plug_cbprivacy_level.


Thanks,


adop

J2.5.3 CB 1.8.0 GJ 2.5.1 Kunena 1.7.2

Please Log in to join the conversation.

12 years 3 months ago - 12 years 3 months ago #189263 by krileon
Replied by krileon on topic Re: Setting email privacy with Auto action
The below query that could be used in a query action will set a fields privacy.
INSERT IGNORE INTO `#__comprofiler_privacy` ( `userid`, `type`, `xid`, `rule`, `params` ) VALUES ( '[user_id]', 'field', FIELD_ID, 2, '' )

With the above replace FIELD_ID with the actual ID of the field you want to set default privacy for the user after registration.


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.

12 years 2 months ago #189778 by adop
Tried it in sql and then in an action and it works smoothly.

Thanks.

J2.5.3 CB 1.8.0 GJ 2.5.1 Kunena 1.7.2

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.339 seconds

Facebook Twitter LinkedIn