How to programmatucally check in a Rails controller whether the current Discourse user is authenticated?

See also: