Username return anonymous

We got the files and reproduced the problem. For some reason the Email of all users is NULL in the AspNetUsers table. How did you create those users? This is why the SecurityService cannot find the user. It uses the following code:

user = await userManager.FindByEmailAsync(name)

which returns null for every user.

Using the code generation ignore list and changing that code to

user = await userManager.FindByNameAsync(name);

seems to solve the problem.

1 Like