3 * Developer Profile Info
5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2010, FusionForge Team
7 * Copyright (C) 2011-2012 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>';
65 <table class="my-layout-table" id="user-profile-personal-info">
67 <td>'. _('User Id:') . '</td>';
69 //print '<div property ="foaf:member" content="fusionforge:ForgeCommunity">';
71 // description as a FusionForge Community member
72 //print '<div property ="dc:Identifier" content="'.$user_id.'">';
74 if (session_loggedin() && forge_check_global_perm('forge_admin')) {
75 $user_id_html = util_make_link('/admin/useredit.php?user_id='.$user_id, $user_id);
77 $user_id_html = $user_id;
80 $html .= '<td><strong>'. $user_id_html .'</strong>';
81 if(!$compact && forge_get_config('use_people')) {
82 $html .= '(' . util_make_link ('/people/viewprofile.php?user_id='.$user_id,'<strong>'._('Skills Profile').'</strong>') . ')';
87 <td>'. _('Login name:') .'</td>
88 <td><strong><span property="sioc:name">' .
89 $user->getUnixName() . '</span></strong></td>
92 <td>'. _('Real Name:') .'</td>';
93 $user_title = $user->getTitle();
94 $user_title_name = $user_title ? $user_title .' ' :'' . $user->getRealName();
96 <div rev="foaf:account">
97 <div about="#me" typeof="foaf:Person">
98 <strong><span property="foaf:name">'.
99 $user_title_name .'</span></strong>
105 if(!isset($GLOBALS['sys_show_contact_info']) || $GLOBALS['sys_show_contact_info']) {
107 $user_mail=$user->getEmail();
108 $user_mailsha1=$user->getSha1Email();
111 <td>'. _('Email Address:') .': </td>
114 // Removed for privacy reasons
115 //print '<span property="sioc:email" content="'. $user_mail .'">';
116 '<span property="sioc:email_sha1" content="'. $user_mailsha1 .'">' .
117 util_make_link ('/sendmessage.php?touser='.$user_id, str_replace('@',' @nospam@ ',$user_mail)) .
123 if ($user->getJabberAddress()) {
126 <td>'. _('Jabber Address') .'</td>
128 <a href="jabber:'. $user->getJabberAddress() .'"><strong>'. $user->getJabberAddress() .'</strong></a>
133 if ($user->getAddress() || $user->getAddress2()) {
135 <td><'. _('Address:') .'</td>
136 <td>'. $user->getAddress() .'<br/>'. $user->getAddress2() .'</td>
140 if ($user->getPhone()) {
142 <td>' . _('Phone:') . '</td>
144 //print '<div property="foaf:phone" content="'.$user->getPhone().'">';
151 if ($user->getFax()) {
153 <td>'. _('FAX:') .'</td>
154 <td>'. $user->getFax() .'</td>
161 <td>'. _('Site Member Since:') .'</td>
162 <td><strong>'. relative_date($user->getAddDate()). '</strong>
166 $user_uri = util_make_url('/users/'. $user->getUnixName() . '/');
168 <td><small>'. _('URI:') .'</small></td>
169 <td><small><a href="'. $user_uri .'">'. $user_uri .'</a></small></td>
182 // c-file-style: "bsd"