This commit is contained in:
@@ -190,6 +190,8 @@ namespace AyaNova.Biz
|
||||
newObject.Salt = Hasher.GenerateSalt();
|
||||
newObject.Password = Hasher.GenerateSalt();
|
||||
newObject.Login = Hasher.GenerateSalt();
|
||||
newObject.UserOptions = new UserOptions();
|
||||
newObject.UserOptions.TranslationId = ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID;
|
||||
await ct.User.AddAsync(newObject);
|
||||
await ct.SaveChangesAsync();
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
||||
@@ -345,7 +347,7 @@ namespace AyaNova.Biz
|
||||
await ValidateCanDelete(dbObject);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
|
||||
|
||||
//Delete sibling objects
|
||||
//USEROPTIONS
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from auseroptions where userid = {dbObject.Id}");
|
||||
@@ -364,7 +366,7 @@ namespace AyaNova.Biz
|
||||
//Remove the object
|
||||
ct.User.Remove(dbObject);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
|
||||
await transaction.CommitAsync();
|
||||
await NotifyEventProcessor.HandlePotentialNotificationEvent(AyaEvent.Deleted, dbObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user