Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

membership.deleteuser() returning false

I am trying to delete an asp.net user from all tables.
When I call:

bool isDeleted = Membership.DeleteUser(username, true);

isDeleted is being set to false;

Is there a way to tell why it is not deleting the user?

like image 295
Dukebaby Avatar asked Feb 26 '26 07:02

Dukebaby


1 Answers

I found another reason why the user could not be deleted:
it happens also if you change (in the aspnet_Users) the UserName but not the LoweredUserName accordingly.
At least this is what happened to me:
as soon that I changed also the LoweredUserName I could finally delete the user.

like image 60
Massi Avatar answered Feb 27 '26 22:02

Massi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!