Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

E-Mail Authentication in DNN 7.4


One bigger item I’ve been dealing with for the 7.4.0 release was a portalsetting called Use Email Address as Username. The trouble with that setting used to be that usage was far from intuitive in the past and I hope to have improved on that quite a bit.

My expectation on how to use that setting always had been that users make use of their e-mail address when authenticating against the website, as it is the case for many other – if not most – sites out there. What DNN used to do in the past was a very basic implementation – it simply would change the label “username” to “e-mail” address in the registration and login form. And of course site administrators would soon run into issues when a user for instance wanted to change its e-mail address. Since technically its former e-mail address was stored in the username field as well as in the e-mail address field in the database, a change of the address would lead to a inconsistency in the database, i.e. the username field would still hold the old e-mail address while the e-mail address field would hold the new address.

Obviously that was far from ideal.

Now with the changes for DNN 7.4 that has improved a lot. First of all, once the setting is activated, we now authenticate against the e-mail field rather the username field. And then we make sure a change of the e-mail address allows the user to effectively use that new address when authenticating.

This caused a few changes in behaviour of the site.

1. On activating the setting, a check is being performed that makes sure we don’t have duplicate e-mail addresses in the portal. If there are any, the setting cannot be a activated.

2. A change of the e-mail address triggers a sign-out from the site, i.e. the user has to re-login using the new e-mail address

I have also tried to make sure that static resources are changed where needed. There were quite a few places where this clearly was not the case.

A note for upgrade scenarios:

Since the setting now requires that you don’t have any duplicate e-mail addresses in the site we needed to perform a test while upgrading that makes sure your addresses are unique. Once the upgrade logic finds any duplicate addresses for portals where the setting had been turned on the setting is being turned off automatically.

For those of you who use that setting I strongly recommend to check for duplicate e-mail address before upgrading. A simple sql statement for performing that check would be as follows.

FROM {databaseOwner}[{objectQualifier}Users] U
    Inner Join {databaseOwner}[{objectQualifier}UserPortals] UP on UP.[UserId] = U.[UserId]
    UP.PortalId = 0 
    U.[Email] HAVING COUNT(*) > 1

This post is cross-posted from my personal blog on




Mark Chambers
I am using a site that was originally DNN v6 and has been upgraded to 7.4.1. When I set the Use Email as Username option I get an error:
Site Settings is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or ....
Mark Chambers Thursday, October 22, 2015 3:54 PM (link)

Comment Form

Only registered users may post comments.


2sic Daniel Mettler (124)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (22)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (270)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?