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.
UP.[UserId] = U.[UserId]
UP.PortalId = 0
(*) > 1
This post is cross-posted from my personal blog on dnn-connect.org