Damn ! How sloppy. I must get my a local instance, make the change there test it and then publish PR's but don't seem to have the time for it. 

$user = get_user_by_username($username); should be removed off course