Link to home
Start Free TrialLog in
Avatar of itkadmin
itkadminFlag for Canada

asked on

Show a count of registered users in Drupal 7

Hello
I want to display a count of approved users in a Drupal 7 site. I'm using PHP to do this.
I have the following
<?php $members = db_query("SELECT count(uid) FROM {users}")->fetchField(); echo "$members"; ?> 

Open in new window

This is giving me all members, approved or not. How do I show only the members that have been approved for membership?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Aaron Feledy
Aaron Feledy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial