Files

36 lines
645 B
PHP
Raw Permalink Normal View History

2026-06-01 21:23:12 -07:00
<?php
namespace Kanboard\Filter;
use Kanboard\Core\Filter\FilterInterface;
class UserNameFilter extends BaseFilter implements FilterInterface
{
/**
* Get search attribute
*
* @access public
* @return string[]
*/
public function getAttributes()
{
return array('name');
}
/**
* Apply filter
*
* @access public
* @return FilterInterface
*/
public function apply()
{
$this->query->beginOr()
->ilike('username', '%'.$this->value.'%')
->ilike('name', '%'.$this->value.'%')
->closeOr();
return $this;
}
}