Example #1
0
 /// <summary>
 /// Add administrator - used from site template to add a site admin
 /// </summary>
 public void AddAdministrator(string name, string pswd)
 {
     YetaWFManager.Syncify(async() => {  // super rare, so sync is OK
         using (UserDefinitionDataProvider dataProvider = new UserDefinitionDataProvider()) {
             await dataProvider.AddAdministratorAsync(name);
         }
         await ChangePasswordAsync(name, pswd);
     });
 }