MembershipProvidersServicesCreateUser Method |
Creates a new User account in Ingeniux CMS. In Membership Provider is integrated account provider (Ingeniux Membership Provider or SQL provider), allow to set password using the provider.
Also, it will try to send 2 email out to the new user's email address, first to inform user that the account has been created, second to send user the password of the new account.
If for any reason the email cannot be sent out, the password information will be brought back to client, so the Administrator can manually inform new user the password.
Namespace: IngeniuxCMService
public XHRServiceResponseGeneric<CreateUserOutput> CreateUser( string providerName, string username, string password, string email )
Name of the membership provider. It is the value of "name" attribute in for the provide entry local-membership.config
<add name="IGXADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, version=4.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="IGXADConnectionString" attributeMapUsername="sAMAccountName"/>
The status information on user creation.
{ "code": 0, "error": null, "message": { "EmailError": null, "EmailError2": null, "EmailSent": true, "MinNonAlphaNumericCharactersLength": 2, "MinPasswordLength": 8, "NewUser": "TestUser", "Newpassword": null, "Status": "Success", "StatusDetail": "" } }
{ "code": 0, "error": null, "message": { "EmailError": "The parameter 'from' cannot be an empty string.\u000d\u000aParameter name: from", "EmailError2": "The parameter 'from' cannot be an empty string.\u000d\u000aParameter name: from", "EmailSent": false, "MinNonAlphaNumericCharactersLength": 2, "MinPasswordLength": 8, "NewUser": "TestUser", "Newpassword": "letmein", "Status": "Success", "StatusDetail": "" } }
This operation is to be used with integrated providers only. It is used to create authentication account, not used to create Ingeniux CMS users.