Fix a regression with using API Tokens to log in.

Review Request #8743 — Created Feb. 13, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
310d5e5...

Reviewers

Review Board 2.5.8 introduced the ability to log into the API using an
e-mail address instead of a username, but this broke the ability to log
in using API tokens. An assumption was made that the credentials for an
auth request had a username, but this isn't true for API tokens.

This change wires off the new logic if a username is not provided.

Successfully logged in using API tokens and using e-mail addresses.