Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

Need help with the event UserCell

R_JR_J Cheerleader & TroubleshooterMunich Moderator

For the dashboard users view, there are two files that contain a FireEvent['UserCell']:

In the index.php I can add my TH tag and in the users.php I can add my user data. Sounds good, but I can't manage to get it working. My first problem has been to determine which of both Events is called. I've take that approach:

    public function userController_userCell_handler ($Sender) {
        if (!isset($Sender->EventArguments['User'])) {
            echo '<th>rubbish</th>';
        } else {
            echo '<td>'.$Sender->EventArguments['User']->Name.'</td>';

In the users.php the current user is passed as a EventArgument. If it is not set, I must be in the index.php, and if it is set, I can show some information from the User object.
To my big surprise, I have no entry in the first row, and in the second row I see the name of user one in my "rubbish" column! I keep staring at the code but cannot find any solution for that.

Can anyone explain to me why this is happening?


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    HA! It's a typo in Vanilla! They wrote EventArgs while it must be EventArguments and the User is set later on correctly as an EventArguments and that's why it appears as shifted! BINGO!

    So please forget my question.

Sign In or Register to comment.