Fix reports logs

- If a user is deleted, we call `getUserName` method on a NULL: let's avoid it :wink:
- `$ent->getUserID` may return `'0'`: [comparing it with NULL returns false](http://mlocati.github.io/php-comparisions/), and the previous code considers `'0'` as a valid user id: let's avoid this by using `empty()` instead of `== NULL`