holyprin / Holyprin.Web.Security

ASP.NET Code-First Membership Provider with basic model abstraction
12 stars 3 forks source link

email login not recognizing roles #6

Open PhantomRick opened 12 years ago

PhantomRick commented 12 years ago

Hi Alicia,

I found another issue regarding email login & roles.

if you have allowLoginWithEmail = true & useEmailAsUsername = false, User.IsInRole() will not find the roles for this user. If useEmailAsUsername = true then the roles are found correctly.

Let me know if you need more information in defining the issue. I'm working around this (useEmailAsUsername = true) but I thought I should let you know.

Cheers, Rick

holyprin commented 12 years ago

This issue could take me a few hours to fix and unfortunately I'm gonna be on my way out for the Prometheus midnight show tonight, I should be able to fix it tomorrow though barring complications at work. it'll involve jumping into the principle and overriding User.Identity.Name to be the email address versus the standard username.

PhantomRick commented 12 years ago

No worries. Thanks for the quick reply & enjoy the movie - it looks brilliant.

francisrath commented 11 years ago

Hi,

I'm having the same problem, but it's not easily bypassable in my case. If you can fix it within a few days I can offer a $100 donation. I was considering donating anyway ;)

Thanks, Francis

holyprin commented 11 years ago

I will do my best to fix these issues, I thought I did before but work decided to move me into mobile / ios development I lost all track of the project.

holyprin commented 11 years ago

So I think I fixed this issue, I haven't used entity framework in so long I had to re-educate myself on my code. Please let me know if other problems arise, I might end up scrapping EF in this scenario (the system will still work with EF) I'll just have a LOT better control over the database using Insight.Database or Dapper.