Used get_username() instead of referencing the username attribute directly
Merge pull request #1418 from oscaro/fix/username

Used get_username() instead of referencing the username attribute