I've been generally avoiding displayname field, in favor of using the first name and last name fields.  
But in this case (and below, on line 689), shouldn't it be using getUserName()?