Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Get user name through EventArguments

edited September 2011 in Vanilla 2.0 - 2.8
I've modified the Facebook plugin so that it now updates the 'wall' of the app on facebook itself whenever a new discussion or comment is created. However, I'm having trouble figuring out what the attributes are named and what is contained in the EventArguments array.

For example I have:

public function PostController_AfterDiscussionSave_Handler($Sender) { $this->postToAppWall( $Sender->EventArguments['Discussion']->Body, $Sender->EventArguments['Discussion']->User->Name); etc... public function postToAppWall($message, $author) { ....

I managed to guess what to put in EventArguments[] and the attribute to specify for the Body, but is there anywhere I can see a list of this kind of thing. The developer documentation appears to be outdated with regard to this. If not, could someone help me find the correct way to specify a User Name?

Thanks
Tagged:

Answers

  • LincLinc Admin
    edited September 2011
    Try this to see everything being passed:

    print_r($Sender->EventArguments);

    View source of the page.
Sign In or Register to comment.