Skip to Content Skip to Menu

[SOLVED] do CB lists display disabled users?

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
12 years 2 months ago - 12 years 2 months ago #206532 by ThePiston
I need a way to list ALL users for a site - it looks like CB lists leave out users that are disabled. Any way to do this?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 12 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 2 months ago #206577 by krileon
Replied by krileon on topic Re: do CB lists display disabled users?
Nope, not without modifying the core code or creating a plugin to alter the userlist query to remove the WHERE statements preventing blocked, unconfirmed, etc.. users from being removed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
12 years 2 months ago - 12 years 2 months ago #206584 by ThePiston
Replied by ThePiston on topic Re: do CB lists display disabled users?
In case anyone wants to do this and is using CBsubs, I created some code to spit out all of your users along with plan, status, and expiration date. The names are linked to their profiles so an admin can go to their profile and edit if needed. Not the prettiest code out there, but it works. Install Jumi and then add this into a new application (edit as required):
Code:
<h1>All Members (Active and Expired), listed by date</h1> Plans:<br /> 1 = Standard<br /> 2 = Military<br /> 3 = Retired<br /> 4 = Educator<br /> 5 = New Grad<br /> 6 = Honorary<br /> 7 = Student<br /> 8 = Ancillary<br /> <em>9 not used</em><br /> 10 = Other<br /> <em>11 not used</em><br /> 12 = Sponsor <br /><br /> A = Active<br /> X = Expired<br /> C = Canceled<br /> U = Unpaid<br /> I = Incomplete <hr "class=dotted" /> <?php $user = & JFactory::getUser(); $db = & JFactory::getDBO(); $query = "SELECT a.`name` , a.`username` , a.`email` , c.`status` as status , b.`cb_active` as active , c.`plan_id` AS plan , c.`subscription_date` AS subscribed , c.`last_renewed_date` AS renewed , c.`expiry_date` AS expires FROM `j17_users` AS a INNER JOIN `j17_comprofiler` AS b ON b.`user_id` = a.`id` INNER JOIN `j17_cbsubs_subscriptions` AS c ON c.`user_id` = b.`user_id` AND b.`confirmed` = 1 AND b.`approved` = 1 AND b.`banned` = 0 ORDER BY c.`expiry_date` DESC, a.`name`"; $db->setQuery( $query ); $result = $db->loadObjectList(); echo "<table border='0'><tbody>"; foreach($result as $row) { echo "<tr>"; echo "<td>Name: <a href='hXXp://www.YOURSITE.org/members/profile/userprofile/"; echo $row->username; echo "'>"; echo $row->name; echo "</a></td>"; echo "<td>Member Type: "; echo $row->plan; echo ", "; echo $row->status; echo "</td>"; echo "<td>Expire(s/d): "; echo $row->expires; echo "</td>"; echo "</tr>"; } echo "</tbody></table>"; ?>

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 12 years 2 months ago by ThePiston.
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum