2 # MantisBT - A PHP based bugtracking system
4 # MantisBT is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
9 # MantisBT is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
19 * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
20 * @link http://www.mantisbt.org
23 * @uses access_api.php
24 * @uses authentication_api.php
25 * @uses config_api.php
26 * @uses constant_inc.php
29 * @uses helper_api.php
33 * @uses string_api.php
35 * @uses utility_api.php
38 require_once( 'core.php' );
39 require_api( 'access_api.php' );
40 require_api( 'authentication_api.php' );
41 require_api( 'config_api.php' );
42 require_api( 'constant_inc.php' );
43 require_api( 'error_api.php' );
44 require_api( 'gpc_api.php' );
45 require_api( 'helper_api.php' );
46 require_api( 'html_api.php' );
47 require_api( 'lang_api.php' );
48 require_api( 'print_api.php' );
49 require_api( 'string_api.php' );
50 require_api( 'user_api.php' );
51 require_api( 'utility_api.php' );
53 auth_ensure_user_authenticated();
55 $t_can_manage = access_has_global_level( config_get( 'manage_user_threshold' ) );
56 $t_can_see_realname = access_has_project_level( config_get( 'show_user_realname_threshold' ) );
57 $t_can_see_email = access_has_project_level( config_get( 'show_user_email_threshold' ) );
59 # extracts the user information for the currently logged in user
60 # and prefixes it with u_
61 $f_user_id = gpc_get_int( 'id', auth_get_current_user_id() );
62 $row = user_get_row( $f_user_id );
64 extract( $row, EXTR_PREFIX_ALL
, 'u' );
66 # In case we're using LDAP to get the email address... this will pull out
67 # that version instead of the one in the DB
68 $u_email = user_get_email( $u_id );
69 $u_realname = user_get_realname( $u_id );
76 <table
class="width75" cellspacing
="1">
78 <td
class="form-title">
79 <?php
echo lang_get( 'view_account_title' ) ?
>
82 <tr
<?php
echo helper_alternate_class() ?
>>
83 <td
class="category" width
="25%">
84 <?php
echo lang_get( 'username' ) ?
>
87 <?php
echo string_display_line( $u_username ) ?
>
90 <tr
<?php
echo helper_alternate_class() ?
>>
92 <?php
echo lang_get( 'email' ) ?
>
96 if ( ! ( $t_can_manage ||
$t_can_see_email ) ) {
97 print error_string(ERROR_ACCESS_DENIED
);
99 if ( !is_blank( $u_email ) ) {
100 print_email_link( $u_email, $u_email );
108 <tr
<?php
echo helper_alternate_class() ?
> valign
="top">
109 <td
class="category">
110 <?php
echo lang_get( 'realname' ) ?
>
114 if ( ! ( $t_can_manage ||
$t_can_see_realname ) ) {
115 print error_string(ERROR_ACCESS_DENIED
);
117 echo string_display_line( $u_realname );
122 <?php
if ( $t_can_manage ) { ?
>
124 <td colspan
="2" class="center">
125 <?php
print_bracket_link( 'manage_user_edit_page.php?user_id=' . $f_user_id, lang_get( 'manage_user' ) ); ?
>