giorgos07/Daarto

Missing parameter in UserTable.UpdateAsync

Opened this issue · 0 comments

slear commented

There is a missing parameter in the SQL for UpdateAsync in the UserTable.cs file.
The query requires an id parameter to execute correctly. This can be seen if you try to call

_userManager.AddToRoleAsync

for example when you want to register a user with some kind of Roles

await DbConnection.ExecuteAsync(updateUserSql, new {
          user.UserName,
          user.NormalizedUserName,          
          user.Email,
          user.NormalizedEmail,
          user.EmailConfirmed,
          user.PasswordHash,
          user.SecurityStamp,
          user.ConcurrencyStamp,
          user.PhoneNumber,
          user.PhoneNumberConfirmed,
          user.TwoFactorEnabled,
          user.LockoutEnd,
          user.LockoutEnabled,
          user.AccessFailedCount,
          user.Id   // <<== missing