summaryrefslogtreecommitdiff
path: root/show_user_avatar.php
blob: 0cfa5c4c919ca4f139d483e675119310c1a7ab0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
 * show user avatar
 *
 * @copyright (c) 2004-15 bitweaver.org
 *
 * @package users
 * @subpackage functions
 */

/**
 * required setup
 */
global $gBitSystem, $gBitUser;

// application to display an image from the database with
// option to resize the image dynamically creating a thumbnail on the fly.
// you have to check if the user has permission to see this gallery
if (!isset($_REQUEST["user"])) {
	die;
}
$info = $gBitUser->get_user_avatar( $_REQUEST["user"] );
$type = $info["avatar_file_type"];
$content = $info["avatar_data"];
header ("Content-type: $type");
echo (string) $content;