$user_data_general = array();
$user_generaldata = User::load_user_profile($uid, (int) $_SESSION['user']['id'], GENERAL);
for ($i = 0; $i < count($user_generaldata); $i++) {
    $name = $user_generaldata[$i]['name'];
    $value = $user_generaldata[$i]['value'];
    $perm_name = $name . "_perm";
    $perm_value = $user_generaldata[$i]['perm'];
    $user_data_general["{$name}"] = $value;
    $user_data_general["{$perm_name}"] = $perm_value;
}
// relations
if ($_SESSION['user']['id']) {
    // user Relations (user relations with all informations)
    $relations = Relation::get_all_relations((int) $uid);
}
$users = User::allUsers_with_paging(1, 10);
$module1 = new ImagesModule($pictures);
if ($page_type == 'public') {
    $module1->mode = PUB;
} else {
    $module1->mode = PRI;
}
$module1->title = "My Pictures";
$module1->orientation = LEFT;
$module2 = new RelationsModule($relations);
if ($page_type == 'public') {
    $module2->mode = PUB;
} else {
    $module2->mode = PRI;
    $module2->type = TAB;
}
示例#2
0
    foreach ($_POST as $k => $v) {
        $search_data_array["{$k}"] = $v;
    }
    try {
        $users = User::search_by_name($search_data_array);
    } catch (PAException $e) {
        $msg = "{$e->message}";
        $search_error = TRUE;
    }
    if ($error == TRUE || $search_error == TRUE) {
        $msg = 'Sorry: you are unable to search the member.<br> Reason: ' . $msg;
    }
} else {
    // all users for face wall page
    // TO DO:: add paging
    $users = User::allUsers_with_paging();
}
if ($error == TRUE) {
    print $msg;
}
$parameter = js_includes("base");
html_header("users", $parameter);
?>

<?php 
$content =& new Template(CURRENT_THEME_FSPATH . "/facewall.tpl");
if ($error == TRUE) {
    $content->set('msg', $msg);
}
$content->set('user_picture', $user_picture);
$content->set('base_url', $base_url);
function peopleaggregator_getUserList($args)
{
    $page = $args['page'];
    $perpage = $args['resultsPerPage'];
    $imageSize = $args['profileImageSize'];
    $showProfileImages = TRUE;
    $imageWidth = $imageHeight = 0;
    if ($imageSize == 'none') {
        $showProfileImages = FALSE;
    } else {
        if ($imageSize == 'full') {
        } else {
            if (preg_match("/^(\\d+)x(\\d+)\$/", $imageSize, $m)) {
                $imageWidth = (int) $m[1];
                $imageHeight = (int) $m[2];
            }
        }
    }
    $total_users = User::count_users();
    $total_pages = api_n_pages($total_users, $perpage);
    $users = User::allUsers_with_paging(FALSE, $perpage, $page);
    $users_out = array();
    foreach ($users['users_data'] as $user) {
        $user_out = array("id" => "user:"******"login" => $user['login_name']);
        if ($showProfileImages) {
            $img_info = api_resize_user_image($user['picture'], $imageWidth, $imageHeight);
            if ($img_info) {
                $user_out['image'] = $img_info;
            }
        }
        $users_out[] = $user_out;
    }
    return array('success' => TRUE, 'page' => $page, 'resultsPerPage' => $perpage, 'totalUsers' => $total_users, 'totalPages' => $total_pages, 'users' => $users_out);
}