1

Closed

Edit and Delete Dinner Links Don't Show Up With Lower Case User Name

description

I am using nerddinner.com.

My username is "SuperDave" -- mixed case. HOWEVER, this morning I logged in with "superdave" -- all lower case.
After I logged in with the lowercase username the Edit and Delete Dinner links did not show up on the dinner details page.

Using superdave --- lower case
Logged in
Clicked on "My Dinners" link and saw a list of my dinners.
Clicked on one of the dinners from the list (http://www.nerddinner.com/4991).
On the detail page, the Edit and Delete links were MISSING.

Using SuperDave --- Mixed Case
Logged in
Clicked on "My Dinners" link and saw a list of my dinners.
Clicked on one of the dinners from the list (http://www.nerddinner.com/4991).
On the detail page, the Edit and Delete links were THERE.

file attachments

Closed Sep 26, 2013 at 6:07 PM by pmourfield

comments

furybyname wrote Oct 24, 2011 at 10:44 PM

During login, an attempt is made to get the canonical name. Unfortunately, inside the GetCanonicalUsername method, the SqlMembershipProvider returns user.UserName in a case that matches the supplied userName argument. So without creating a new provider, we're lucky enough to get the correct canonical name with _provider.GetUserNameByEmail(user.Email). Suggested patch attached. Hack? Maybe.