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

user
current-user
authentication
ruby

(Dmitry Fedyuk) #1

You can do it by comparing the current_user method result with nil.

An example

The method’s implementation


How to programmatucally check in JavaScript whether the current Discourse user is authenticated?
How to show the «Log In» popup programmatically?
(Dmitry Fedyuk) #2

See also:


(Dmitry Fedyuk) #3

How to show the «Log In» popup programmatically?