SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This article http://www.thesharepointbar.com/?p=340 how to limit a read on a user in BCS, but we can't find the correct syntax for fba-users. (MS Quote: If the login mode for the user is claims-based, then the value passed is the unique value that identifies the user (for example, membership: username, username@provider.com)).

So we asked ourselves how to write qualifiedusername behind the scenes with @Username in a create part of BCS (and see what it wrote). But we couldn't find a way for that either. Thanks in advance. Rob

share|improve this question

Given a login name (SPContext.Current.Web.CurrentUser.LoginName) of "i:0#.f|fbaprovider|user" the following will result in "user"

string result = LoginName;
if (Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.IsEncodedClaim(LoginName))
{
    result = Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.Local.DecodeClaim(LoginName).Value;
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.