Indentation fixes
Fix log view when user id is '0' or deleted users

- if a user is deleted, we call a method on a NULL: let's avoid it
- getUserID may return '0': comparing with NULL returns false
  (see http://mlocati.github.io/php-comparisions/)
Merge pull request #407 from mlocati/fix-reports-logs

Fix reports logs