Questions tagged [usermanager]
122 questions
3
votes
1 answer
How to get purpose field for userManager.VerifyUserTokenAsync?
When I'm trying to reset a password, I'm using userManager.VerifyUserTokenAsync(user, tokenProvider, purpose, token) but it always returns false. My suspicion is that the purpose field is wrong but I'm not sure what should actually go there.
My…

roonz11
- 795
- 1
- 13
- 24
3
votes
0 answers
userManager.GetRolesAsync(user) returns empty list after extending IdentityRole
I needed to add a List property to IdentityRole in order to establish a Many-to-Many relationship.
After doing this and running code-first migration, everything seemed fine.
However now when I try and pull roles for a user, the result is always…

roonz11
- 795
- 1
- 13
- 24
3
votes
1 answer
Does UserManager have cache?
I have an application that uses Microsoft.AspNetCore.Identity.UserManager to manage users. I use core 2.2. UserManager is injected by built-in dependency injection in my services (not by me). like this:
public MyService(UserManager…

Alexandr
- 5,460
- 4
- 40
- 70
3
votes
1 answer
Manage customers to be allowed to purchase in Woocommerce
We have wholesale web with eshop. We need to block new customer from buying anything until we verify him (because of shipping restrictions and so on). Is it possible (by setting him some different role or blocking customer role from buying)?
BTW I…

eXPRESS
- 425
- 2
- 4
- 19
3
votes
0 answers
Password incorrect after upgrade to .net core
I'm using asp.net 4.6.1 using native UserManager to handle Register/Login flow. After upgraded to .net core 1.1, it appears that the hash algorithm has changed so users could not login using the old password.
For example, the password "P@ssword123"…

Le Huu HoangGia
- 99
- 10
3
votes
1 answer
Extending UserManager to allow for management of new user data?
UserManager in ASPNET Identity contains functions like AddPasswordAsync and SetPhoneNumberAsync.
I've added properties for FirstName and LastName who's values weren't set when I registered the user so I want to add screens to Manage these values…

Ortund
- 8,095
- 18
- 71
- 139
3
votes
2 answers
ASP.NET Identity IUserEmailStore error in MVC
I am trying to send a confirmation email when a user registers together with the generated Token. Token is OK. But when sending email,I am getting this error:
System.NotSupportedException: Store does not implement IUserEmailStore.
And my…

Yash Dutt
- 196
- 1
- 2
- 14
3
votes
3 answers
ASP.NET Identity, multiple users with the same username, but belonging to different companies. Override FindAsync?
I'm new with MVC and EF, and I'm working on a project where I use Identity for user and role management. In the predefined login function from Visual Studio there's a function named FindAsync, used to get the user by username and password. In my…

P Lysenius
- 1,133
- 1
- 13
- 25
3
votes
1 answer
UserManager.SendEmailAsync throws Message.Destination is null
Im trying to implement email confirmation for user registration using standard UserManager and EmailService.
For some reason while calling UserManager.SendEmailAsync(userId,"","") i have IdentityMessage.Destnation is null...
Here is my EmailService…

ArkadyB
- 1,265
- 1
- 19
- 37
2
votes
1 answer
How can I avoid fetching my user 2 times in this controller method?
I have this method below that gets the current user, but it fetches the user 2 times, which seems a little redundant, so I'd like to see if there is a way I can reduce it to just once.
The first "User" fetch comes from…

chuckd
- 13,460
- 29
- 152
- 331
2
votes
1 answer
Create UserManager in Class library
I'm working in a app using Blazor and .NetCore.
I use Microsoft Identity for the roles and Users. In the base project generate by Visual Studio, the code for use identity it's construct by default. For objectives of the project, i'm working with…

Steven Gazo M.
- 97
- 8
2
votes
0 answers
How to configure multiple UserManager with different DbContext
I'm struggling with Net Core Identity, more specifically the UserManager API. I have two databases with the same logic structure, one of them is for testing and homologation purposes. I looked around for a good while and managed to somehow make the…
2
votes
2 answers
Django best practices regarding custom User models
This is more of a general best practices question. When you start a new project in Django, do you generally create a custom User model, or rely on the default one?
Personally it seems cleaner to me if I don't mess with the default User model. If…

Zahin Zaman
- 210
- 3
- 9
2
votes
2 answers
How to include a user manager to another application for ASP.NET Core 3.1
I'm developing two different applications, I will name them A and B.
A is an internet platform, where you can logon only if you have a valid user account.
B is an intranet platform, where users can authenticate via Active Directory. An…

schmityv
- 68
- 1
- 6
2
votes
0 answers
Modifying the User Manager to Search by Email - Pipleline returns users but nothing shows up on the interface
I posted this question here too: https://community.sitecore.net/developers/f/8/t/3681
Hi all,
I am trying to modify the User Manager to search by email. I am using Sitecore 7.1. I updated the UserProvider pipeline to check for emails using RegEx. If…

Albraa
- 337
- 1
- 4
- 11