We have moved to GitHub Issues
Created by Ben Curthoys 16 Jul 2013, 12:40:26 Updated by Rune Grønkjær 05 Aug 2013, 13:27:32
I have a database full of members that I've imported, not all of them having email addresses. Since upgrading from 6.0.2 to 6.0.7, attempting to edit and save a member without an email address throws an exception
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.cms.presentation.members.EditMember.MemberEmailExistCheck_ServerValidate(Object source, ServerValidateEventArgs args) +205 System.Web.UI.WebControls.CustomValidator.OnServerValidate(String value) +172
This happens even if the edit that I'm making is to add an email address. Members who already have email addresses can be edited and saved fine.
If I run update cmsMember set Email = 'not set' where Email = '' then I can save the member again, but I'd rather not do that, as an invalid email address is worse than none at all.
In this system, accounts and passwords are created in advance and posted to people, and they supply their email address when they first log in and activate their account, which doesn't seem totally unreasonable.
Fixed in changeset e48f08b6579b3698ec03b6d86c6bb8fbefadb471
Does this mean that members in v6.1.3 can now be saved from the backend without an e-mail again?
@Rune Yeah, is you have an existing member you can leave the email address blank. The email is still required in the create new member dialog though. You can create members through the api without an email address.
Cool thanks Sebastiaan. I still think the new member dialog should respect the "requiresUniqueEmail" attribute from the web.config. I can't see why it should'nt :)
@Rune It does.. the email has to be unique in that dialog too. I guess you're thinking of removing the required field for email address there, right?
@Sebastiaan Yes, I guess I am. Is there a way to do that, that I don't know of?
@Rune Off the top of my head: just remove the asp:RequiredFieldValidator from the aspx file, that should do the trick. But I don't see why we should require an email address there anyway so we might just have to remove that requirement altogether.
Don't just remove it. Someone probably uses it :) Maybe a setting somewhere would be more appropriate.
Backwards Compatible: True
Due in version: 6.1.3