Invites in user page queries database without checking table emptiness

I fixed that bug a few days ago. Please make sure your Discourse is up-to-date in order to get the bugfix.

https://github.com/discourse/discourse/commit/4be8f17e66d95e786edd91cdade334ff5da8ee04