Object Details - for Plug-ins

13 years 1 month ago #156268 by WebMuse
Object Details - for Plug-ins was created by WebMuse
I'm trying to figure out how to modify an existing plugin to do what I need it to do -- just need to change the triggering event.
These user management event functions (existing and what I need to change it to) have different parameters. Specifically:
Used Now:  function onBeforeUserRegistration (&$row, &$rowExtras, false)

Needed:  function onAfterUserConfirm ($userObject, true)

I've already looked through the Plugin Framework API document, and also reviewed the contents of several of the com_profiler component.

Where do I find a description of what fields $userObject contains? It might also be nice to see the definition for $row & $rowExtras also, although I can likely figure this out from the old plugin's code.

I will also need to access many of the fields in the user's profile. Can you provide a tip on how to quickly access this information? Will it be obvious once I see the fields in $userObject, or is there some function to call that will load all these values?

Your help is appreciated.
G

WebMuse G

Please Log in to join the conversation.

13 years 1 month ago #156277 by krileon
Replied by krileon on topic Re: Object Details - for Plug-ins
$userObject and $row is typically their CB user object containing all their information. Typically made up of the class moscomprofilerUser, which can be see in cb.tables.php. More on triggers can be found at the below tutorial.

www.allmysocials.com/tutorials/item/228-event-triggers

More on obtaining fields in the below trigger.

www.allmysocials.com/tutorials/item/235-obtaining-field-values-through-api


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.175 seconds

Facebook Twitter LinkedIn