SaaS CMS has officially launched! Learn more now.

Specifying/changing login fields


I hope this will be a quick and easy one. I have created a new Relate+ project using the EPiServer.Templates.RelatePlus project template. This runs ok but I can't login to the edit or admin area as the login control on the homepage requires email address rather than username (as does the login prompt when navigating to edit or admin).

I have tried this with Windows Membership, Active Directory and the default EPiServerCommonMembershipProvider and can't login with any of them as it doesn't recognise the email address. As part of the project creation process I created an admin user account and I have the username and password for this but as the login requires email address I can't use this to login.

I'm assuming that this is controlled by a setting somewhere but I can't find where this might be. Does anyone know how to change this? I'm using version 2 of Relate+

Any suggestions greatly appreciated,


Aug 16, 2010 12:29

The login control might have a validator that requires an email address, but the login for edit/admin should not. You should be able to log in with your windows account there if you enable the Windows membership and role providers, preferably by putting the windows membership provider in the CommonIntegratingProvider settings and using that.

BTW, what error message do you get on the edit/admin login? Does it really complain about the login or do you just get the login screen back with no error message (which would indicate insufficient access rights rather than faulty login).

Aug 16, 2010 12:45

I've just found that using the admin account username in the email field allows me to login ok. Does anyone know how to change the label in the login field to display user name rather than email address. Also, I would like to get this working with Active Directory can anyone recommend any useful articles on this? Ideally I would like to use multiplexing so I can combine AD with the EPiServerCommonMembershipProvider (which is the Relate+ membership model??)



Aug 16, 2010 12:45

Hi Magnus,

I don't think there is a problem with the login control as such as it allows me to login with the admin account and with a new account that I created using Admin mode in community. The issue is that the label for the login control displays email address rather than username but it accepts and validates username.

Related to this I have setup multiplexing using the EPiServerCommon role and membership providers and Active Directory role and membership providers. This works if I login using the EPiServer user credentials and up to a point it works with an Active Directory account. The error with the active directory account occurs in the method GetPresentaionName(user, maxLength, formatText) in the class Templates/RelatePlus/ExtensionMethods.cs. The user object being passed in as null and it's failing on this, it's as if the authentication is working but the user object is not populated for some reason.

Aug 16, 2010 13:53

The community system relies on it's own membership provider, which comes in different flavors all named something with EPiServerCommon*, for storing user data (everything from the users contact details to "friends" etc). So for the templates to work you HAVE to use the Common providers. But you can still have a backend consisting of a different provider (like windows or sql provider) if you use the CommonIntegrating provider. It works by creating a shadow account in the Common database. Read for some details on this. There is even a CommonIntegratingMultiplexing provider which allows you to do both integrating (shadow copying) and multiplexing at the same time.

As for the label on the login form it is (at least for the edit mode login) set in a language file key, login.username if my memory serves me right.

Aug 16, 2010 14:48

Hi Magnus,

The article was just what I needed to get the active directory working with the EPiServerCommon membership provider and I traced the label for the login form as well. Many thanks for your help,


Aug 17, 2010 12:19
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.