Removing additonal IP from User that was in use by a domain causes wrong IP in config

Version 1.52

Bugfix
Finished

Duplicate: 1) User + domain assigned to server IP .1 2) Add an additional IP .2 to the User. 3) Login as the User, add .2 to the domain. 4) Remove .1 from the domain. 5) logout, back to creator, edit user and delete .2 from User. Expected result would be everything, dns, all configs, revert back to .1. What was happening, was close, but the domain.com.conf file did not get the last .1 user IP. Previous check was checking if the domain.com.conf's IP was not in the domain.com.ip_list file, and use index[0] for the .conf ip, but the domain.com.ip_list was actually empty at that point, so the conf overwrite did nothing, and left the previous .2 IP. New check to ensure the "backup" IP used is not NULL, and if it is, use the user.conf ip.

Interested to try DirectAdmin? Get a 30-day Free Trial!