<function name="rpcf_get_user_by_account" id="0x2026"> <input> <integer name="account_id"/> </input> <output> <integer name="user_id"/> <if variable="user_id" value="0" condition="eq"> <error code="19" comment="No such account linked with user"/> </if> </output> </function>
// return user_id or 0 if user not found function rpcf_get_user_by_account($account_id) { //0x2026 $ret=array(); if (!$this->connection->urfa_call(0x2026)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($account_id); $this->connection->urfa_send_param($packet); if ($x = $this->connection->urfa_get_data()) { $user_id = $x->DataGetInt(); } // $this->connection->urfa_get_data(); return $user_id; }