Questions tagged [spuser]

Represents a user in Microsoft SharePoint Foundation.

Filter by
Sorted by
Tagged with
17 votes
3 answers
24k views

How do I convert SPUser to SPFieldUser?

I have a field in a list that accepts an SPFieldUser object. I have an SPUser object that I would like to populate that field with, but I cannot implicitly convert from one to the other. How would I ...
Meyer Denney's user avatar
  • 2,864
3 votes
4 answers
15k views

How to find permission level for specific user using visual studio?

How to find permission level for specific user in site collection and subsite using visual studio?
Hitesh Chandegara's user avatar
5 votes
5 answers
20k views

Error in Web.EnsureUser(user) :- User Not Found

Hey Friends I am trying to develop a web part in that I am fetching the user name. But doing this I am getting the error that User cannot be found. But the main thing is that in the line where I ...
Rahul Gokani's user avatar
  • 1,074
3 votes
4 answers
19k views

How to know the exact loginname of the user who operates as system account?

If current logged user operates as "System Account", SPContext.Current.Web.CurrentUser.LoginName will return "sharepoint\system", so I want to know the exact loginname of the user. Here is what I ...
Xiaodan Mao's user avatar
2 votes
2 answers
8k views

How to remove user from Sharepoint Group using JavaScript?

I want to add and remove user to/from Office 365 Group. I tried using C# code but got error : "User does not exist or is not unique". After searching on the web I can't find solution.So i tried ...
Ronak Patel's user avatar
  • 3,261
1 vote
1 answer
4k views

SPFieldUserValue User is null

I have a list in which I can also view the version of each item. Suppose I have an item ItemX which has been modified by UserX, I then delete UserX and try to view the version item of ItemX which had ...
ceee's user avatar
  • 23
1 vote
1 answer
850 views

Display SPUser Information on an application page

I have an application page (SP2010) where I have a SPUser object (the current user), now I would like to display this SPUser as an Hyperlink on the apsx, linked to his UserProfilePage (userdisp.aspx) ...
mr.purzel's user avatar
1 vote
1 answer
7k views

How to check if current user is exist in a AD group inside a Sharepoint group

I have a sharepoint permission group with some permissionslevels. The name is: "SPProgress". Inside this group I have inserted a AD usergroup with the name "ADProgress". I would like to check in ...
Ola's user avatar
  • 4,405
1 vote
4 answers
26k views

How do I restrict access to a particular page in SharePoint?

I want two pages from my site to be restricted from viewers until its contents are thoroughly checked by my team. How do I accomplish this? Thank you very much!
Juliana Marie's user avatar
1 vote
2 answers
4k views

Getting SPUser Last login date / time

Is there a way to get the last login time from an SPUser object? I don't want the last login time to Active Directory, but specifically for the sharepoint site.
BlueBird's user avatar
  • 1,850
1 vote
1 answer
3k views

How to map Claims to SPUser object?

I have SharePoint 2010 with Claims Authentication (SAML / AD FS v2). I have made an incoming mapping for UPN, Role, CommonName. I want to show the user's "DisplayName" in the right corner (the Name on ...
user avatar
1 vote
1 answer
2k views

Get SPUser by passing Email address

i have an Email address of particular user. Now i want the SP username of that particular email address programatically. Thanks.
Ishani's user avatar
  • 179