Thursday, June 14, 2012

Sharepoint 2010 Claims check user name

// Comment
IClaimsPrincipal claimsPrincipal = Page.User as IClaimsPrincipal;
                    if (claimsPrincipal != null)
                    {
                        IClaimsIdentity claimsIdentity = (IClaimsIdentity)Thread.CurrentPrincipal.Identity;
                        if (claimsIdentity != null)
                        {

                        }
                        else
                        {
                            Logger.Instance.LogInfo("CreateChildControls", "User not found", false);
                        }
                    }

No comments:

Post a Comment