Search code examples
ruby-on-rails-3sorcery

how to find logged-in users using sorcery?


Is there any way to find the currently logged-in users and delete the sessions of particular users using sorcery?

Thanks in advance.


Solution

  • From the documentation:

    Below is a summary of the library methods. Most method names are self explaining and the rest are commented:
    
    # activity logging
    current_users
    

    You can use current_users to iterate through all your users. To log them out have a look at reset_session.