I have users in string like "Mikhail Pushin" and I want to add clickable links to users in a column of list item. Also I should be able to use filtering on this user column.
Unfortunately, I can't do it the obvious way using SPUser object, because I can't get it for some users which have no access to my site and hence are not visible in web.AllUsers, web.Users and web.SiteUsers.
What I tried
Add AD group which has all the users to site, but this doesn't help, because a user should be logged in at least once before to be visible in web.*Users.
Get ProfileBase object using
UserProfileManager userProfileManager = new UserProfileManager(SPServiceContext.GetContext(SPContext.Current.Site)); ProfileBase userProfiles = userProfileManager.Search("Mikhail Pushin");
This way I can find a user, but it seems there is no way of converting ProfileBase object to SPUser.
Created a link to a user manually by using Note field and HTML's A tag. In the HREF attribute I set link obtained from ProfileBase. This way works well; however, in such a case I can't using OOB filtering on this column (which works for text and user columns if we click on the header).
Probably, some of you have ideas how I can achieve my goal. Every suggestion is very appreciated.