Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
468d4992
authored
2011-02-25 06:16:16 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
User Manager added Member ID row
1 parent
0181ba0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
com/UserManager/UserManager.php
com/UserManager/views/display_users.php
com/UserManager/UserManager.php
View file @
468d499
...
...
@@ -151,8 +151,9 @@ function get_users($role = null, $pagenum=1, $records_per_page=0, $return_count_
$uid
=
(
int
)
$user
->
ID
;
$user
=
new
WP_User
(
$uid
);
reset
(
$user
->
roles
);
$role
=
ucwords
(
current
(
$user
->
roles
));
$users
[]
=
array
(
'uid'
=>
$uid
,
'first_name'
=>
$user
->
first_name
,
'last_name'
=>
$user
->
last_name
,
'role'
=>
$role
,
'user_login'
=>
$user
->
user_login
,
'email'
=>
$user
->
user_email
,
'status'
=>
$user
->
status
);
$role
=
ucwords
(
current
(
$user
->
roles
));
$member_id
=
get_user_meta
(
$uid
,
'member_id'
,
true
);
$users
[]
=
array
(
'uid'
=>
$uid
,
'first_name'
=>
$user
->
first_name
,
'last_name'
=>
$user
->
last_name
,
'role'
=>
$role
,
'user_login'
=>
$user
->
user_login
,
'email'
=>
$user
->
user_email
,
'status'
=>
$user
->
status
,
'member_id'
=>
$member_id
);
}
return
$users
;
}
...
...
com/UserManager/views/display_users.php
View file @
468d499
...
...
@@ -171,6 +171,7 @@ if ($last > 1) {
<table
cellspacing=
"0"
class=
"widefat post fixed"
>
<thead>
<tr>
<th
scope=
"col"
class=
"manage-column"
>
ID
</th>
<th
scope=
"col"
class=
"manage-column"
>
Name
</th>
<th
scope=
"col"
width=
"180"
class=
"manage-column"
>
Username
</th>
<th
scope=
"col"
width=
"250"
class=
"manage-column"
>
Email
</th>
...
...
@@ -187,6 +188,7 @@ if ($last > 1) {
foreach
(
$site_users
as
$user
)
:
?>
<tr>
<td>
<?php
echo
$user
[
'member_id'
]
?>
</td>
<td><a
href=
"/wp-admin/admin.php?page=cbv_users&action=edit&uid=
<?php
echo
$user
[
'uid'
]
?>
"
>
<?php
echo
$user
[
'last_name'
]
.
', '
.
$user
[
'first_name'
]
?>
</a></td>
<td><a
href=
"/wp-admin/admin.php?page=cbv_users&action=edit&uid=
<?php
echo
$user
[
'uid'
]
?>
"
>
<?php
echo
$user
[
'user_login'
]
?>
</a></td>
<td>
<?php
echo
$user
[
'email'
]
?>
</td>
...
...
Please
register
or
sign in
to post a comment