4 * This file is (c) Copyright 2010 by Sabri LABBENE, Institut
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * This program has been developed in the frame of the HELIOS
22 * project with financial support of its funders.
26 require_once('../../env.inc.php');
27 require_once $gfwww.'include/pre.php';
28 //require_once $gfconfig.'plugins/compactpreview/config.php';
31 // $user = session_get_user(); // get the session user
33 // if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {
34 // exit_error("Invalid User", "Cannot Process your request for this user.");
37 // $type = getStringFromRequest('type');
38 // $id = getStringFromRequest('id');
39 // $pluginname = getStringFromRequest('pluginname');
42 // exit_error("Cannot Process your request","No TYPE specified"); // you can create items in Base.tab and customize this messages
44 // exit_error("Cannot Process your request","No ID specified");
47 $user = getStringFromRequest('user');
49 $user_obj = user_get_object_by_name($user);
52 $user_real_name = $user_obj->getRealName();
53 $user_name = $user_obj->getUnixName();
54 $user_id = $user_obj->getID();
55 $user_uri = util_make_url ("/users/$user_name/");
56 $user_title = $user_obj->getTitle();
57 $title = ($user_title ? $user_title .' ' :''). $user_real_name;
59 // invoke user_logo hook
60 $logo_params = array('user_id' => $user_id, 'size' => 'm', 'content' => '');
61 plugin_hook_by_reference('user_logo', $logo_params);
63 if ($logo_params['content']) {
64 $logo = $logo_params['content'];
73 <title>User: <?php echo $user_real_name;?> (Identifier: <?php echo $user_id;?>)</title>
84 <td colspan="2"><i>Compact User Preview</i></td>
87 <!-- TODO : use user_logo hook here -->
89 src="/plugins/compactpreview/images/userTooltip/oslc.png" />
95 <?php echo $title;?></td>
98 <td><b>Login Name:</b>
102 <?php echo $user_name;?></td>
105 <td><b>Identifier:</b>
109 <?php echo $user_id;?></td>
112 <td><b>Member since:</b>
116 <?php print date(_('Y-m-d H:i'), $user_obj->getAddDate()); ?></td>
119 <td><small><b>URI:</b> <a href="<?php echo $user_uri;?>"><?php echo $user_uri;?>
127 <b>User Name:</b> <?php echo $title;?><br/>
128 <b>Login Name:</b> <?php echo $user_name;?> <br/>
129 <b>Identifier:</b> <?php echo $user_id;?> <br/>
130 <b>Member since:</b> <?php print date(_('Y-m-d H:i'), $user_obj->getAddDate()); ?><br/>
131 <small><b>URI:</b> <?php echo $user_uri;?></small><br/>
140 // c-file-style: "bsd"