Listing Logged In Users (like the admin 'all user slots

Posted by Community Admin on 04-Aug-2018 18:20

Listing Logged In Users (like the admin 'all user slots used' screen)

All Replies

Posted by Community Admin on 25-Aug-2015 00:00

I've noticed that admin users can see all the users logged in, and give the admin ability to kick off users. But main issue is if you are not admin, you don't see any list of users. 

What i want to do is display the users to a regular user whom are logged in. This is to create a process where we're running out of slots and some users don't log out. 

I would rather upgrade my user slot count at a premium price but I suppose there is no option for that, but rather to spend a significant amount more to upgrade the the next package. We'd rather pay for more slots vs an entire feature set we likely won't use (yet). 

Posted by Community Admin on 25-Aug-2015 00:00

Where in Sitefinity does it display the logged in users? I've wanted this feature for sometime but can not find it.

Posted by Community Admin on 25-Aug-2015 00:00

I found it,  it's on the main user page in the back end under status.

Posted by Community Admin on 26-Aug-2015 00:00

Hi Dave, 

So I'm trying to recreate this feature. 

var userManager = UserManager.GetManager();

var users = userManager.GetUsers().OrderBy(user => user.UserName).ToList();

var usersLoggedIn = users.Where(user => user.IsLoggedIn).ToList();

But I seem to get almost 38 users. Now, I looked at the database, and did a select by

SELECT * FROM [sf635000_intranet].[dbo].[sf_users] 
WHERE is_logged_in = 1 ORDER BY last_login_date DESC

But there I know some users logged out, which would explain why this select statement fails. I could have someone who's listed as the 8th row, but they still show as logged in on the CMS. Isn't there a 'last_logged_out' column I could use?

What would the proper API method be to get 'the currently logged in users'??

Posted by Community Admin on 28-Aug-2015 00:00


 Any ideas?

Posted by Community Admin on 31-Aug-2015 00:00

Hi Richard,

This is a known issue in Sitefinity and we have logged a bug related to it in our feedback portal:

User.IsLoggedIn does not display the correct status

The issue is fixed in internal build 8.0.5719.0 and what I can suggest is to upgrade your Sitefinity project to the latest internal build of Sitefinity 8.0 or directly to Sitefinity 8.1 where the fix is also included. Please refer to the following documentation article for more details about the supported upgrade procedure.

If you decide to upgrade to the internal build, please note that you can download the latest internal build for each Sitefinity version from your account in section Products & Subscriptions -> Latest Internal Builds.

Sabrie Nedzhip
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

This thread is closed