public function searchBy($searchQuery, array $options = array(), $statementsType = null)
    {
        $query = $this->newSearchQuery($searchQuery, array(
            'first_name',
            'last_name',
            'email',
            'id',
        ), $statementsType, $options);

        return new Collection($query);
    }
public function searchBy($searchQuery, array $options = array(), $statementsType = null)
    {
        $query = $this->newSearchQuery($searchQuery, array(
            'first_name',
            'last_name',
            'email',
            'id',
        ), $statementsType, $options);

        return new Collection($query);
    }
public function searchBy ( $ searchQuery , array $ options = array ( ) , $ statementsType = null ) { $ query = $ this -> newSearchQuery ( $ searchQuery , array ( 'first_name' , 'last_name' , 'email' , 'id' , ) , $ statementsType , $ options ) ; return new Collection ( $ query ) ; }
Search a User by options.

@example
$users = Subbly::api('subbly.user')->searchBy(array(
'firstname' => 'Jon',
'lastname'  => 'Snow',
));
// OR
$users = Subbly::api('subbly.user')->searchBy('some words');

@param array|string $searchQuery    Search params
@param array        $options        Query options
@param string       $statementsType Type of statement null|or|and (default is null)

@return \Subbly\Model\Collection

@api
Search a User by options .