src/snac/server/ServerExecutor.php
/**
     * Search the Users
     *
     * Searches the current users of the system based on the query from the input.  Returns a list
     * of those matching users.
     *
     * @param string[] $input The input from the client
     * @return string[] The response to send to the client
     */
Search the Users
Searches the current users of the system based on the query from the input.  Returns a list
of those matching users.

@param string[] $input The input from the client
@return string[] The response to send to the client
Search the Users Searches the current users of the system based on the query from the input . Returns a list of those matching users . @param string [] $input The input from the client @return string [] The response to send to the client
public function searchUsers(&$input) {
        if (!isset($input["query_string"]))
            throw new \snac\exceptions\SNACInputException("Query string required to search", 400);
        $getAll = true;
        if (isset($input["filter"])) {
            if ($input["filter"] == "active")
                $getAll = false;
        }
        $roleFilter = null;
        if (isset($input["role"])) {
            $roleFilter = $input["role"];
        }
        $count = \snac\Config::$SQL_LIMIT;
        if (isset($input["count"]))
            $count = $input["count"];
        $results = $this->uStore->searchUsers(
                        $input["query_string"],
                        $count,
                        $roleFilter,
                        $getAll);
        $response = array();
        $response["results"] = array();
        foreach ($results as $result) {
            array_push($response["results"], $result->toArray(false));
        }
        return $response;
    }
public function searchUsers ( & $ input ) { if ( ! isset ( $ input [ " query_string " ] ) ) throw new \ snac \ exceptions \ SNACInputException ( " Query string required to search " , 400 ) ; $ getAll = true ; if ( isset ( $ input [ " filter " ] ) ) { if ( $ input [ " filter " ] == " active " ) $ getAll = false ; } $ roleFilter = null ; if ( isset ( $ input [ " role " ] ) ) { $ roleFilter = $ input [ " role " ] ; } $ count = \ snac \ Config :: $ SQL_LIMIT ; if ( isset ( $ input [ " count " ] ) ) $ count = $ input [ " count " ] ; $ results = $ this -> uStore -> searchUsers ( $ input [ " query_string " ] , $ count , $ roleFilter , $ getAll ) ; $ response = array ( ) ; $ response [ " results " ] = array ( ) ; foreach ( $ results as $ result ) { array_push ( $ response [ " results " ] , $ result -> toArray ( false ) ) ; } return $ response ; }
Search the Users
 Searches the current users of the system based on the query from the input.
Search the Users Searches the current users of the system based on the query from the input .