How to securely verify if user is logged in using API

  • Updated

Sample of different variations that can be used to validate if a user is logged in or not using the API.

For 9.0 and versions prior use:

ContentApi.EkContentRef.IsAllowed(0, 0, "users", "IsLoggedIn", ContentApi.UserId);

For 9.1 use:

Ektron.Cms.ObjectFactory.GetUser().IsCmsLoggedIn