4 $prefetch = array('`points`', '`last_active_date`', '`register_date`', '`sig`', '`quote`',
5 '`reg_email`', '`public_email`', '`private_email`', '`useragent`',
6 'INET_NTOA(`last_login_ip`) AS `last_login_ip`',
7 'INET_NTOA(`last_ip`) AS `last_ip`',
8 'INET_NTOA(`reg_ip`) AS `reg_ip`');
11 $page->title
= 'User Details';
13 if ( ! ($user instanceof authuser
) )
14 $page->errorfooter('login');
16 $uid = is_numeric($_SERVER['QUERY_STRING']) ?
intval($_SERVER['QUERY_STRING']) : $user->userid
;
18 if ( $user->userid
!= $uid && $DB->query('SELECT `userid` FROM `users` WHERE `userid` = '.$uid)->num_rows
== 0 )
19 $page->errorfooter('userid');
21 if ( $user->userid
== $uid ) {
22 $page->title
= 'Your Details';
26 $user2 = new reguser($uid, $prefetch);
27 $page->title
= 'User Details for '.$user2->alias
;
32 $sig = new message($user2->sig
);
33 $quote = new message($user2->quote
);
34 } catch ( InvalidMessageException
$e ) {
35 $sig = new message($user2->sig
, message
::M_HTML_NONE
);
36 $quote = new message($user2->quote
, message
::M_HTML_NONE
);
40 '<dl class="user-info">
42 <dd><strong>',$user2->alias
,'</strong></dd>
44 <dd>',$user2->userid
,'</dd>
46 <dd>',$user2->points
,'</dd>
48 <dd>',$user->fdate($user2->last_active_date
),'</dd>
49 <dt>Registration Date</dt>
50 <dd>',$user->fdate($user2->register_date
),'</dd>
52 <dd>',( $sig->output ?
$sig->output
: '<var>Empty</var>'),'</dd>
54 <dd>',( $quote->output ?
$quote->output
: '<var>Empty</var>'),'</dd>
55 <dt>Public E-mail Address</dt>
56 <dd>',( $user2->public_email ?
$user2->public_email
: '<var>Empty</var>'),'</dd>
58 <dd>',htmlspecialchars($user2->useragent
),"</dd>
62 if ( defined('DEVELOPER') ) {
64 '<h2 id="admin-info">Admin-only Information</h2>
65 <dl class="user-info">
66 <dt>Private E-Mail Address</dt>
67 <dd>',( $user2->private_email ?
$user2->private_email
: '<var>Empty</var>'),'</dd>
68 <dt>Signup E-Mail Address</dt>
69 <dd>',( $user2->reg_email ?
$user2->reg_email
: '<var>Empty</var>'),"</dd>\n";
72 'Last Login From' => $user2->last_login_ip
,
73 'Last Active From' => $user2->last_ip
,
74 'Signed Up From' => $user2->reg_ip
77 foreach ( $fields as $title => $addr )
78 echo '<dt>',$title,"</dt>\n",
79 " <dd>",( is_null($addr) ?
'Unknown Address' : $addr ),"</dd>\n";
84 if ( $user->userid
== $uid ) {
86 '<dl class="user-options">
88 <dd><a href="theme">Theme</a></dd>
89 <dd><a href="options">Options</a></dd>
90 <dd><a href="passwd">Change Password</a></dd>
91 <dd><a href="userlist">User Directory</a></dd>
92 <dd><a href="invites">Invite List</a></dd>