Using comparison with true or false to test booleans is perverse.  Are you sure you don't need to check that the value of the comarison is true ?  How many layers more do we need ?
(true != !(true == ((IsUserNameValid(conn->username) == false) != false))
To test a boolean, use it as a boolean; that's what it is.  To test it's false, use the ! operator.
```
if (conn->username == NULL || !IsUserNameValid(conn->username))
```
(FWIW, comparison against false is at least harmlessly perverse.  Comparisons against true are, in contrast, buggy; if someone later changes the function to return, say, an int that's 0 in the cases where it used to return false, positive in the true cases, then any comparisons with true shall fail for returns other than 1; and the person changing the API is unlikely to catch the breakage.)