File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ wp_skip_all () {
1414#
1515# It expects $site_url to be set. This is useful in a for loop of every site.
1616wp_on_site () {
17- wp --skip-themes --path=" ${config[wp_path]} " --url=" ${site_url} " " $@ "
17+ wp --skip-themes --skip-plugins -- path=" ${config[wp_path]} " --url=" ${site_url} " " $@ "
1818}
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /bin/env bash
2+
3+ # Lists every user and their roles on every site.
4+
5+ source ' source/includes.sh' ;
6+
7+ fields_to_display=' user_login,user_email,roles' ;
8+
9+ log_file=' user-list.txt' ;
10+
11+ echo ' #########################################################' | tee " $log_file " ;
12+ echo ' Users by WordPress site' | tee -a " $log_file " ;
13+ echo ' #########################################################' | tee -a " $log_file " ;
14+
15+ for site_url in $( wp_skip_all site list --field=" url" --archived=0 --deleted=0 --spam=0) ; do
16+
17+ echo ' -------------------------------------------------' | tee -a " $log_file " ;
18+ echo " Site ${site_url} " | tee -a " $log_file " ;
19+ wp_on_site user list --fields=" ${fields_to_display} " | tee -a " $log_file " ;
20+
21+ done ;
You can’t perform that action at this time.
0 commit comments