User Manager added Member ID row
Showing
2 changed files
with
5 additions
and
2 deletions
| ... | @@ -151,8 +151,9 @@ function get_users($role = null, $pagenum=1, $records_per_page=0, $return_count_ | ... | @@ -151,8 +151,9 @@ function get_users($role = null, $pagenum=1, $records_per_page=0, $return_count_ |
| 151 | $uid = (int) $user->ID; | 151 | $uid = (int) $user->ID; |
| 152 | $user = new WP_User($uid); | 152 | $user = new WP_User($uid); |
| 153 | reset($user->roles); | 153 | reset($user->roles); |
| 154 | $role = ucwords(current($user->roles)); | 154 | $role = ucwords(current($user->roles)); |
| 155 | $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); | 155 | $member_id = get_user_meta($uid, 'member_id', true); |
| 156 | $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); | ||
| 156 | } | 157 | } |
| 157 | return $users; | 158 | return $users; |
| 158 | } | 159 | } | ... | ... |
| ... | @@ -171,6 +171,7 @@ if ($last > 1) { | ... | @@ -171,6 +171,7 @@ if ($last > 1) { |
| 171 | <table cellspacing="0" class="widefat post fixed"> | 171 | <table cellspacing="0" class="widefat post fixed"> |
| 172 | <thead> | 172 | <thead> |
| 173 | <tr> | 173 | <tr> |
| 174 | <th scope="col" class="manage-column">ID</th> | ||
| 174 | <th scope="col" class="manage-column">Name</th> | 175 | <th scope="col" class="manage-column">Name</th> |
| 175 | <th scope="col" width="180" class="manage-column">Username</th> | 176 | <th scope="col" width="180" class="manage-column">Username</th> |
| 176 | <th scope="col" width="250" class="manage-column">Email</th> | 177 | <th scope="col" width="250" class="manage-column">Email</th> |
| ... | @@ -187,6 +188,7 @@ if ($last > 1) { | ... | @@ -187,6 +188,7 @@ if ($last > 1) { |
| 187 | foreach($site_users as $user): | 188 | foreach($site_users as $user): |
| 188 | ?> | 189 | ?> |
| 189 | <tr> | 190 | <tr> |
| 191 | <td><?php echo $user['member_id']?></td> | ||
| 190 | <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> | 192 | <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> |
| 191 | <td><a href="/wp-admin/admin.php?page=cbv_users&action=edit&uid=<?php echo $user['uid']?>"><?php echo $user['user_login']?></a></td> | 193 | <td><a href="/wp-admin/admin.php?page=cbv_users&action=edit&uid=<?php echo $user['uid']?>"><?php echo $user['user_login']?></a></td> |
| 192 | <td><?php echo $user['email']?></td> | 194 | <td><?php echo $user['email']?></td> | ... | ... |
-
Please register or sign in to post a comment