3 * Developer Profile Info
5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2010, FusionForge Team
7 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 // This code was extracted from user_home.php and factorized in a function
29 * Display user's profile / personal info either in compact or extensive way
32 * @param boolean $compact
35 function user_personal_information($user, $compact = false, $title = false) {
37 $user_id = $user->getID();
40 $params = array('user_id' => $user_id, 'size' => 'l', 'content' => '');
41 plugin_hook_by_reference('user_logo', $params);
42 if ($params['content']) {
43 $user_logo = $params['content'];
50 <td colspan="2">'. $title . '</td>
54 $html = '<table width="100%" cellpadding="2" cellspacing="2" border="0">';
59 $html .= '<td width="150">'. $user_logo .'</td>';
66 <table class="my-layout-table" id="user-profile-personal-info">
68 <td>'. _('User Id:') . '</td>';
70 //print '<div property ="foaf:member" content="fusionforge:ForgeCommunity">';
72 // description as a FusionForge Community member
73 //print '<div property ="dc:Identifier" content="'.$user_id.'">';
75 if (session_loggedin() && forge_check_global_perm('forge_admin')) {
76 $user_id_html = util_make_link('/admin/useredit.php?user_id='.$user_id, $user_id);
78 $user_id_html = $user_id;
81 $html .= '<td><strong>'. $user_id_html .'</strong>';
82 if(!$compact && forge_get_config('use_people')) {
83 $html .= '(' . util_make_link ('/people/viewprofile.php?user_id='.$user_id,'<strong>'._('Skills Profile').'</strong>') . ')';
88 <td>'. _('Login name:') .'</td>
89 <td><strong><span property="sioc:name">' .
90 $user->getUnixName() . '</span></strong></td>
93 <td>'. _('Real Name:') .'</td>';
94 $user_title = $user->getTitle();
95 $user_title_name = $user_title ? $user_title .' ' :'' . $user->getRealName();
97 <div rev="foaf:account">
98 <div about="#me" typeof="foaf:Person">
99 <strong><span property="foaf:name">'.
100 $user_title_name .'</span></strong>
106 if(!isset($GLOBALS['sys_show_contact_info']) || $GLOBALS['sys_show_contact_info']) {
108 $user_mail=$user->getEmail();
109 $user_mailsha1=$user->getSha1Email();
112 <td>'. _('Email Address:') .': </td>
115 // Removed for privacy reasons
116 //print '<span property="sioc:email" content="'. $user_mail .'">';
117 '<span property="sioc:email_sha1" content="'. $user_mailsha1 .'">' .
118 util_make_link ('/sendmessage.php?touser='.$user_id, str_replace('@',' @nospam@ ',$user_mail)) .
124 if ($user->getJabberAddress()) {
127 <td>'. _('Jabber Address') .'</td>
129 <a href="jabber:'. $user->getJabberAddress() .'"><strong>'. $user->getJabberAddress() .'</strong></a>
134 if ($user->getAddress() || $user->getAddress2()) {
136 <td><'. _('Address:') .'</td>
137 <td>'. $user->getAddress() .'<br/>'. $user->getAddress2() .'</td>
141 if ($user->getPhone()) {
143 <td>' . _('Phone:') . '</td>
145 //print '<div property="foaf:phone" content="'.$user->getPhone().'">';
152 if ($user->getFax()) {
154 <td>'. _('FAX:') .'</td>
155 <td>'. $user->getFax() .'</td>
162 <td>'. _('Site Member Since:') .'</td>
163 <td><strong>'. date(_('Y-m-d H:i'), $user->getAddDate()). '</strong>
167 $user_uri = util_make_url ("/users/". $user->getUnixName() . "/");
169 <td><small>'. _('URI:') .'</small></td>
170 <td><small><a href="'. $user_uri .'">'. $user_uri .'</a></small></td>
183 // c-file-style: "bsd"