From f41d96786497551a5fffcb05f6e66563a8e93168 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 19 Aug 2013 10:41:49 +0200 Subject: [PATCH] Fixes: U4-2637 Error adding a User using AD Membership Provider when no Email Address Defined --- src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs index e1847f22a4..36ce464a63 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/login.aspx.cs @@ -161,14 +161,15 @@ namespace umbraco.cms.presentation /// Maps active directory account to umbraco user account /// /// Name of the login. + /// Email address of the user private void ActiveDirectoryMapping(string loginName, string email) { // Password is not copied over because it is stored in active directory for security! // The user is create with default access to content and as a writer user type if (BusinessLogic.User.getUserId(loginName) == -1) { - BusinessLogic.User.MakeNew(loginName, loginName, string.Empty, email, BusinessLogic.UserType.GetUserType(2)); - BusinessLogic.User u = new BusinessLogic.User(loginName); + BusinessLogic.User.MakeNew(loginName, loginName, string.Empty, email ?? "", UserType.GetUserType(2)); + var u = new User(loginName); u.addApplication(Constants.Applications.Content); } }