CRITICAL: Add missing function exports to user-manager.sh
Problem: - user-manager.sh defined functions but NEVER exported them - Functions worked when called directly but returned empty in nested calls - calculate_server_memory_capacity showed 0 pools because get_user_domains returned empty - Memory capacity output showed garbled: 'pickledperilMB' instead of numbers Root cause: - When php-analyzer.sh called get_user_domains() inside a function, bash couldn't find the function because it wasn't exported - Only exported functions are available in subshells/nested calls Fix: - Added export -f for ALL 14 user-manager functions - Now functions work correctly when called from other libraries Functions exported: - list_all_users, list_cpanel_users, list_plesk_users, list_interworx_users, list_system_users - get_user_info, get_user_domains, get_cpanel_user_domains, get_plesk_user_domains, get_interworx_user_domains - get_user_databases, get_user_log_files, select_user_interactive, display_user_overview Impact: - Memory capacity analysis now works - All domain iteration functions work correctly
This commit is contained in:
@@ -720,3 +720,19 @@ show_all_users_summary() {
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Export all functions for use in other scripts
|
||||||
|
export -f list_all_users
|
||||||
|
export -f list_cpanel_users
|
||||||
|
export -f list_plesk_users
|
||||||
|
export -f list_interworx_users
|
||||||
|
export -f list_system_users
|
||||||
|
export -f get_user_info
|
||||||
|
export -f get_user_domains
|
||||||
|
export -f get_cpanel_user_domains
|
||||||
|
export -f get_plesk_user_domains
|
||||||
|
export -f get_interworx_user_domains
|
||||||
|
export -f get_user_databases
|
||||||
|
export -f get_user_log_files
|
||||||
|
export -f select_user_interactive
|
||||||
|
export -f display_user_overview
|
||||||
|
|||||||
Reference in New Issue
Block a user