本文整理汇总了C#中ISecurityService.AddUserToTdSubmitter方法的典型用法代码示例。如果您正苦于以下问题:C# ISecurityService.AddUserToTdSubmitter方法的具体用法?C# ISecurityService.AddUserToTdSubmitter怎么用?C# ISecurityService.AddUserToTdSubmitter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISecurityService
的用法示例。
在下文中一共展示了ISecurityService.AddUserToTdSubmitter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUser
public MembershipCreateStatus CreateUser(string userName, string displayName, string password, string email, ISecurityService security, IApplicationSettingsService appSettings)
{
if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
if (String.IsNullOrEmpty(email)) throw new ArgumentException("Value cannot be null or empty.", "email");
MembershipCreateStatus status;
var u = _provider.CreateUser(userName, password, email, null, null, true, null, out status);
if (status == MembershipCreateStatus.Success)
{
u.Comment = displayName;
_provider.UpdateUser(u);
if (appSettings.CreateSqlMembershipRegistrationsAsSubmitters)
{
security.AddUserToTdSubmitter(u.UserName);
}
}
return status;
}