Another fix to upgrade clickoptions in windows
[openemr.git] / library / plugins / function.user_info.php
bloba15ca68f0c52c569a7b0a97f2b6837a953e3e1f2
1 <?php
2 /**
3 * Smarty plugin
4 * @package Smarty
5 * @subpackage plugins
6 * user_info() version for smarty templates
7 * Kevin Yeh 2013
8 */
11 /**
12 * Smarty {user_info} function plugin
14 * Type: function<br>
15 * Name: user_info<br>
16 * Purpose: Return the user info for a given ID<br>
18 * Examples:
20 * {user_info id=1}
22 * @param array
23 * @param Smarty
26 require_once(dirname(__FILE__) . '../../user.inc');
28 function smarty_function_user_info($params, &$smarty)
30 if (empty($params['id'])) {
31 $smarty->trigger_error("user_info: missing 'id' parameter");
32 return;
33 } else {
34 $user_id = $params['id'];
37 $user_info=getUserIDInfo($user_id);
38 if($user_info)
40 echo $user_info['fname']." ".$user_info['lname'];