SPUtility.GetUserKeyFromUserName method
會從userName取得使用者穩定性,使識別碼、 user 機碼。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function GetUserKeyFromUserName ( _
userName As String _
) As String
'用途
Dim userName As String
Dim returnValue As String
returnValue = SPUtility.GetUserKeyFromUserName(userName)
public static string GetUserKeyFromUserName(
string userName
)
參數
userName
Type: System.String完整的使用者名稱,例如您取得從**[!:SPClaimProviderManager.GetUserIdentifierEncodedClaim(IIdentityidentity)]**
傳回值
Type: System.String
輸入使用者索引鍵。
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | 如果userName是 null。 |
ArgumentException | 如果userName是空的。 |
SPException | 如果userName太大,或是為不是宣告樣式使用者名稱。 |
請參閱
參照
Microsoft.SharePoint.Utilities namespace
[!:SPWebService.ContentService.MembershipUserKeyType]