diff --git a/core/scripts/hysteria2/edit_user.sh b/core/scripts/hysteria2/edit_user.sh index f27d63c..5deee56 100644 --- a/core/scripts/hysteria2/edit_user.sh +++ b/core/scripts/hysteria2/edit_user.sh @@ -220,20 +220,16 @@ edit_user() { new_traffic_limit=$traffic_limit fi - new_expiration_days=${new_expiration_days:-$expiration_days} + new_expiration_days=${new_expiration_days:-$expiration_days} new_creation_date=${new_creation_date:-$creation_date} new_blocked=$(convert_blocked_status "${new_blocked:-$blocked}") - + python3 $CLI_PATH restart-hysteria2 + if ! update_user_info "$username" "$new_username" "$new_password" "$new_traffic_limit" "$new_expiration_days" "$new_creation_date" "$new_blocked"; then return 1 # Update user failed fi - if [ $? -ne 0 ]; then - echo "Failed to restart Hysteria service." - return 1 - fi - echo "User updated successfully." return 0 # Operation complete without error.