<?php
// $Id: getUserInfo.php,v 1.1 2004/07/11 10:28:46 Farsus Exp $
// -------------------------------------------------------------------------//
//			                 RUNCMS                                         //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// Original Author: i-Tech (Half-Dead)
// Author Website : http://www.i-Technology.NET
// License Type   : LGPL: See /manual/LICENSES/LGPL.txt
// ------------------------------------------------------------------------- //

// Function: blogger.getUserInfo

load_function("isAdmin");
$user = (string)$params[1];
$pass = (string)$params[2];
$uid  = login($user, $pass);

$query = $db->query("SELECT uname, url, email, name FROM " .$db->prefix("users"). " WHERE uid=$uid");

list($nickname, $url, $email, $name) = $db->fetch_row($query);

$rpc_encoder->start_struct();
$rpc_encoder->add_value("string" , $nickname, "nickname");
$rpc_encoder->add_value("integer", $uid     , "userid");
$rpc_encoder->add_value("string" , $url     , "url");
$rpc_encoder->add_value("string" , $email   , "email");
$rpc_encoder->add_value("string" , $name    , "lastname");
$rpc_encoder->add_value("string" , $nickname, "firstname");
$rpc_encoder->end_struct();

$rpc_encoder->return_call();
?>
