Ozzy47
Well-known member
I am trying to extend
Function:
My file:
Now in my option if I set days below 180, it will work and only return users that have been active in the days set. But, If I set the days above 180, it still only returns users active in the past 180 days. Even if I don't return the parent, it still does not let me go above 180.
Am I missing something or is this being overridden elsewhere?
XF/Finder/User.php
specifically isRecentlyActive
Function:
PHP:
public function isRecentlyActive($days = 180)
{
$this->where('last_activity', '>', time() - ($days * 86400));
return $this;
}
My file:
PHP:
<?php
namespace OzzModz\ActiveDays\XF\Finder;
use XF\Mvc\Entity\Finder;
class User extends XFCP_User
{
public function isRecentlyActive($days = 180)
{
$parent = parent::isRecentlyActive();
$options = \XF::options();
$days = $options->ozzmodzActiveDays_days;
$this->where('last_activity', '>', time() - ($days * 86400));
return $this;
return $parent;
}
}
Now in my option if I set days below 180, it will work and only return users that have been active in the days set. But, If I set the days above 180, it still only returns users active in the past 180 days. Even if I don't return the parent, it still does not let me go above 180.
Am I missing something or is this being overridden elsewhere?