Options
How to fetch Comment UserID

I'm trying to write a plugin. I have the following problem ... How to extract the user id who wrote this post?
It works but only if the file
but this code is not added by default
any ideas?
public function DiscussionController_CommentOptions_Handler(&$Sender) {
$Sender->Options .= '<li><a href="/'.$Sender->UserID.'/">'.Gdn::Translate('test').'</a></li>';
}
It works but only if the file
/discussion/helper_functions.php
have$Sender->UserID = $Comment->InsertUserID;
but this code is not added by default
any ideas?
0
Comments
$Sender->EventArguments['Comment'] = &$Comment;
it seems to me that this code should be the beginning of the file and not the end.
Change put on GitHub