Example #1
0
function intSetSingleUserInfo(&$smarty, $user_id, $normal_username = null, $voip_username = null)
{
    $user_info_req = new GetUserInfo($user_id, $normal_username, $voip_username);
    $resp = $user_info_req->sendAndRecv();
    if ($resp->isSuccessful()) {
        $user_info = $resp->getResult();
        $user_info = array_values($user_info);
        intSetSingleUserInfoIntoSmarty($smarty, $user_info[0]);
    } else {
        $resp->setErrorInSmarty($smarty);
    }
    return $resp;
}
Example #2
0
function getUsersInfoByUserID(&$smarty, $user_ids)
{
    /*return a list of user_infos of users with id in $user_ids
     */
    if (sizeof($user_ids) == 0) {
        return array();
    }
    $req = new GetUserInfo(join(",", $user_ids));
    $resp = $req->sendAndRecv();
    if ($resp->isSuccessful()) {
        return $resp->getResult();
    } else {
        $resp->setErrorInSmarty($smarty);
        return array();
    }
}