8e0fc369e5
ISSUE: Lines 173-174 called get_user_domains() twice for the same user: local primary_domain=$(get_user_domains "$user" | head -1) local domain_count=$(get_user_domains "$user" | grep -v "^$" | wc -l) This caused redundant function execution and system scanning. FIX: Call function once, store output, reuse: local user_all_domains=$(get_user_domains "$user") local primary_domain=$(echo "$user_all_domains" | head -1) local domain_count=$(echo "$user_all_domains" | grep -v "^$" | wc -l) IMPACT: - Eliminates redundant system scans (Apache configs, directory traversal) - Faster database building - Less system load during detection Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>