This seems a bit weird. I would just make this:

```
'method': function(value, element) {
  isUserNameAvailable(value, function(available) {
    // Show the available icon if the username is available, otherwise show the unavailable icon
    if (available) {
      $('#createuser-username-available', $rootel).removeClass('icon-remove').addClass('icon-ok');
    } else {
      $('#createuser-username-available', $rootel).removeClass('icon-ok').addClass('icon-remove');
    }
    return available;
  }
}
```