Posted by humansky on August 11, 2015 at 2:35pm
I'm trying to get a list of user emails that belong to the role 'site administrators' from a remote multisite Drupal environment. When I run the following command:
drush @remote_site sql-query 'SELECT DISTINCT u.mail FROM users AS u LEFT JOIN users_roles AS ur ON u.uid=ur.uid LEFT JOIN role AS r ON ur.rid=r.rid WHERE r.name = "site administrator"'
The SQL query works, however, it only works for the "default" site. Is there anyway to run this command for all the sites in my environment? I tried adding "@sites" after the remote alias, but it still only points to the default folder. Any ideas?
Thank you,
Henry
Categories: alias multisite, drush
Comments
Accidentally submitted the
Accidentally submitted the form twice, please refer to this discussion for more informaiton:
https://groups.drupal.org/node/476808