Hi,
Where do I find the Item property on Dynamicweb.Security.UserManagement.User?
Allan
Hi,
Where do I find the Item property on Dynamicweb.Security.UserManagement.User?
Allan
Hi Allan,
I'm not sure why it was removed, but you can get the item like this:
var user = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser(); if (!string.IsNullOrEmpty(user.ItemType) && !string.IsNullOrEmpty(user.ItemId)) { var userItem = Dynamicweb.Services.Items.GetItem(user.ItemType, user.ItemId); if (userItem != null) { // do your thing } }
Best regards,
Morten
Hi Morten,
Thanks - I will do this for now.
BR,
Allan
Hi Allan,
Items where not meant to be part of the User-object. They have custom fields, so the whole logic connecting Users and Items has been removed.
@NP: Was this by mistake?
BR
Martin
No, it was because security is further down the DW9 architecture stack and does not have access to items which is in Dynamicweb.dll. So it is a technical issue.
But items should never have been on a user.... But that is another topic.
You must be logged in to post in the forum