Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not returning any users in a D7 install #12

Open
nodenineinc opened this issue Feb 4, 2019 · 3 comments
Open

Not returning any users in a D7 install #12

nodenineinc opened this issue Feb 4, 2019 · 3 comments

Comments

@nodenineinc
Copy link

nodenineinc commented Feb 4, 2019

Hello.

I'm not quite sure why, but I just cloned this into my functional drush/drupal-7 env and tried running it but it's not returning any users.

Steps performed:

====
1. cd into /usr/share/php/drush/commands
2. git clone
3. cd into website drupal install dir
4. drush cache-clear drush
5. drush user-list
[ no results returned ]

1. cd into ~/.drush/
2. git clone
3. cd into website drupal install dir
4. drush cache-clear drush
5. drush user-list
[ no results returned ]

I have run with the drush -d (debug) flag as well and it offered no hints as to why this is not returning any users.

================================
# drush user-list --status=active -d
Bootstrap to phase 0. [0 sec, 1.71 MB]                               [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 1.79 MB] [bootstrap]
Cache HIT cid: 5.10.0-commandfiles-0-c35b7c271ea4bda7a0449e6064fad5d5 [0.01 sec, 1.8 MB]                                                                                                                                               [debug]
Bootstrap to phase 0. [0.04 sec, 4.24 MB]                                                                                                                                                                                          [bootstrap]
Bootstrap to phase 6. [0.04 sec, 4.24 MB]                                                                                                                                                                                          [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.04 sec, 4.24 MB]                                                                                                                                                         [bootstrap]
Initialized Drupal 7.63 root directory at /var/www/localhost/domains/[OBFUSCATED]/htdocs/[OBFUSCATED] [0.05 sec, 5.12 MB]                                                                                             [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.05 sec, 5.13 MB]                                                                                                                                                         [bootstrap]
Initialized Drupal site default at sites/default [0.05 sec, 5.13 MB]                                                                                                                                                                  [notice]
Cache HIT cid: 5.10.0-commandfiles-2-c32acd775c18a90c5b41d0fc9accf5ab [0.05 sec, 5.13 MB]                                                                                                                                              [debug]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.05 sec, 5.13 MB]                                                                                                                                                [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.05 sec, 5.24 MB]                                                                                                                                                     [bootstrap]
Successfully connected to the Drupal database. [0.05 sec, 5.24 MB]                                                                                                                                                                 [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.06 sec, 5.61 MB]                                                                                                                                                         [bootstrap]
Cache HIT cid: 5.10.0-commandfiles-5-273f7dd31de84a6c09f182bae7a365f4 [0.22 sec, 22.33 MB]                                                                                                                                             [debug]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.23 sec, 22.65 MB]                                                                                                                                                       [bootstrap]
Successfully logged into Drupal as Anonymous (uid=0) [0.23 sec, 22.86 MB]                                                                                                                                                          [bootstrap]
Found command: user-list (commandfile=user_list) [0.23 sec, 22.86 MB]                                                                                                                                                              [bootstrap]
Command dispatch complete [0.25 sec, 23 MB]                                                                                                                                                                                           [notice]
 Timer  Cum (sec)  Count  Avg (msec) 
 page   0.197      1      196.66     

Peak memory usage was 23.6 MB [0.25 sec, 23 MB]                                                      
================================

I have 3 current users for this site instance that I am building, and I would expect at least the 'Administrator' account to show at a minimum.

I am leveraging the LDAP module for external user authentication, so don't know if that's perhaps a factor, but end result I need is to be able to pull a list of drupal accounts, their status, and assigned roles, so that I can run scripts to perform further processing upon account creation. This module sound like exactly what I need tool-wise, but I could use a hand debugging why it's not currently returning any results.

Cheers,
-Chris

@jbickar
Copy link
Owner

jbickar commented Feb 5, 2019

I'm not familiar with how the LDAP module works; what does drush sqlq 'select * from users' return? I.e., are there entries (users) in the users table?

@nodenineinc
Copy link
Author

nodenineinc commented Feb 5, 2019

Good morning - thank you for the follow-up.

Just for the sake of brevity in the response, I limited the SELECT statement a bit, but as you can see, the users table returns users without any issue.

drush sqlq 'select uid,name,status from users'
mysql: [Warning] Using a password on the command line interface can be insecure.
uid	name	status
0		0
1	administrator	1
245	chris	1
3220	testuser	1

@nodenineinc
Copy link
Author

nodenineinc commented Feb 5, 2019

Also want to add that the other built-in drush user commands, such as 'user-information' are functioning fine. For some reason though, the added 'user-list' command just returns no output.

# drush user-information testuser
 User ID       :  3220                                
 User name     :  testuser                            
 User mail     :  [email protected]             
 User roles    :  authenticated user, paymentverified 
 User status   :  active                              
# drush uls
# drush user-list
# 

And wanted to mention about the environment, we're running Drupal 7.63 for this site instance, with all the latest updates and patches applied for core and any/all installed modules and themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants