XF 2.2 getActivityDetails Issue

Ozzy47

Well-known member
So I've got this in my file:
PHP:
    public static function getActivityDetails(array $activities)
    {
        return \XF::phrase('XP_VB_verified_viewing_list');
    }

Here is the full file:
PHP:
<?php

namespace XP\VB\Pub\Controller;

use XF\Pub\Controller\AbstractController;

class verified extends AbstractController
{
    //public function actionIndex(ParameterBag $params)
    public function actionIndex()
    {
          // Get variables
          $visitor = \XF::visitor();
          $options = \XF::options();
    
        // Show error if no permission
        if (!$visitor->hasPermission('view', 'XP_VB_List'))
        {
            return $this->noPermission();
        }
    
        $finder = \XF::finder('XF:User')->where('xp_vb_is_verified', '=',1);

        $total = $finder->total();
        $page = $this->filterPage();
        $perPage = $options->XPVBmembersPerPage;

        $this->assertValidPage($page, $perPage, $total, 'verified', $finder);

        $verified = $finder->limitByPage($page, $perPage)->order('user_id', 'ASC')->fetch();

        $viewParams = [
            'verified' => $verified,
            'page' => $page,
            'perPage' => $perPage,
            'total' => $total
        ];

          // Okay send it to the template
          return $this->view('XP\VB:Verified', 'xp_vb_list', $viewParams);
    }

    // Show the location when viewing who's oline
    public static function getActivityDetails(array $activities)
    {
        return \XF::phrase('XP_VB_verified_viewing_list');
    }
}

But when viewing the online list, I am still seeing Viewing unknown page when members are on that page.
 
You might need to check what's in the session activity table to see if that's what you expect.

The only thing that jumps out is that I suspect your class name is wrong, though I'm not sure that would cause this. You've called it verified rather than Verified, though whether that's wrong depends on what the file name is and how you've referenced the class.
 
Back
Top Bottom