public function deleteIfReplace($name, $data)
    {
        if ($name && isset($data['name']) && $name !== $data['name']) {
            $this->ldapUserRepo->updateUsersByServerName($name, $data['name']);
            $this->deleteServer($name);
        }
    }
public function deleteIfReplace($name, $data)
    {
        if ($name && isset($data['name']) && $name !== $data['name']) {
            $this->ldapUserRepo->updateUsersByServerName($name, $data['name']);
            $this->deleteServer($name);
        }
    }
public function deleteIfReplace ( $ name , $ data ) { if ( $ name && isset ( $ data [ 'name' ] ) && $ name !== $ data [ 'name' ] ) { $ this -> ldapUserRepo -> updateUsersByServerName ( $ name , $ data [ 'name' ] ) ; $ this -> deleteServer ( $ name ) ; } }
Delete a server configuration if the newest one replace it.

@param name The name of the server
@param data An array containing LDAP informations as host, port or dn
Delete a server configuration if the newest one replace it .