1
vote
1answer
47 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) ...
0
votes
2answers
121 views

SPUser have logon into Site Collection?

Possible to loop through all Site Collection Users and check if they have ever logon into the Site Collection and when? db table dbo.UserInfo tokens info can be useful? this script can retrieve the ...
1
vote
2answers
385 views

Is possible to rename a SPUser(IsDomainGroup) LoginName?

I want to rename SPPrincipals that are ADGroups. I've tried with $SPFarm = Get-SPFarm #$SPFarm.MigrateGroup("loginName", "newLoginName") $SPFarm.MigrateUserAccount("loginName", "newLoginName", ...
2
votes
0answers
726 views

How to get SPUser from FBA login name

I have a Form Based Authentication login name login_name how to get an SPUser object for that login name. I have tried the Web.EnsureUser(string.Format("c:0-.f|role|{0}", name)); but it gives me ...
0
votes
2answers
1k views

How to get extra User properties?

A few custom properties have been added to the user object via CA. I would I retrieve these fields programmatically? Solution: UserProfileManager mgr = new ...
1
vote
1answer
531 views

Set-SPUser not adding SPUser

Adding a user trough the following PS command line works just fine: Set-SPUser -Identity "Domain\LoginName" -Web $Web.Url -Group "GroupName" The problem occurs when the user is deleted and then the ...
0
votes
1answer
729 views

Find SPUser Preferred Name from UserPrincipal

I am looping through a group of UserPrincipal that was retrieved from Active Directory. I need to get find a SPUser using the properties of the UserPrincipal. Once the SPUser is found I will get its ...
6
votes
3answers
3k views

What is the best way to determine if CurrentUser is System Account?

Traditionally I use: if (web.CurrentUser.Name == "System Account") Is there a possibility the System Account Name could be something other then "System Account". Is there a more reliable way to ...
0
votes
2answers
564 views

EnsureUser not working in Job

Background: sharepoint 2010 custom membership provider custom job to create users Job is deployed by code and executed first time from some WinForms exe, executed by local Administrator. Users are ...
0
votes
1answer
5k views

Add users to SP Group

I am using following PS script to add users from a text file. Some of the users in the text file are inactive or gone (basically can't be resolved). The error message from the catch block is executed ...