Error in WHMCS when using easy ticket

0

I'm using the easy ticket module for the whmcs it is returning the following error

array(2) { ["result"]=> string(5) "error" ["message"]=> string(51) "Admin User var is required if no admin is logged in" }

My cod that generates this error is this

function cpfcnpj($busca,$id){
        $dados['clientid'] = $id;
        $dados['stats'] = true;
        $dados['responsetype'] = 'xml';

        $cliente = localAPI('getclientsdetails',$dados);
        var_dump($cliente);
        foreach ($cliente['client']['customfields'] as $pos=>$val)
            if (in_array($busca, $val)) {
                $campo = $pos;
            break;
        }
        $valor = $cliente['client']['customfields'][$campo]['value'];

        return $valor;
    }

Where is this localAPI ? or how should I do to resolve?

    
asked by anonymous 06.02.2017 / 21:35

1 answer

0

I could solve the localAPI parameter requests an admin user

Then changing to

 $cliente = localAPI('getclientsdetails',$dados,'adm');

where adm is my whmcs administrative user the problem has been solved.

    
06.02.2017 / 22:12