root/branches/release-26/php/lib/function.mtauthoruserpicurl.php @ 1174

Revision 1174, 0.6 kB (checked in by bchoate, 23 months ago)

Updated copyright year for source.

Line 
1<?php
2# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
3# This program is distributed under the terms of the
4# GNU General Public License, version 2.
5#
6# $Id$
7
8function smarty_function_mtauthoruserpicurl($args, &$ctx) {
9    $author = $ctx->stash('author');
10    if (!$author) return '';
11
12    $asset_id = isset($author['author_userpic_asset_id']) ? $author['author_userpic_asset_id'] : 0;
13    $asset = $ctx->mt->db->fetch_assets(array('id' => $asset_id));
14    if (!$asset) return '';
15
16    $blog =& $ctx->stash('blog');
17
18    require_once("MTUtil.php");
19    $userpic_url = userpic_url($asset[0], $blog, $author);
20    return $userpic_url;
21}
22?>
Note: See TracBrowser for help on using the browser.