At one time I was thinking of doing something very similar. I wanted to just have my users use their email for login. The problem is, once you start changing this type of thing you have to do all of it. So to do this in DNN I was going to do this with this methodology. First, find an existing set of registration pages that you like. So for me, I like the UCanUse User Attribute Module. This one lets me do a lot of extending of the registration like adding new items. You can also do this with the DNN registration page though. Create a new project out of it. Copy the register and user.ascx and vb pages to it and do the changes. If you're looking for a quick and simple short cut you could just edit the exiting registration module page. The control that handles the user login is user.ascx under the directory \dotnetnuke\controls\. Go in there and change the user.ascx page. First what you do is just rem out the whole username row. Either rem out or delete this area of the ascx
|
|
<td class="SubHead" width="175">
<dnn:label id="plUserName" runat="server" controlname="txtUsername" text="User Name:"></dnn:label></td>
<td class="NormalBold" noWrap>
<asp:textbox id="txtUsername" tabIndex="3" runat="server" cssclass="NormalTextBox" size="25"
maxlength="175"></asp:textbox>
<asp:label id="lblUsernameAsterisk" runat="server">*</asp:label>
<asp:label id="lblUsername" runat="server"></asp:label>
<asp:requiredfieldvalidator id="valUsername" runat="server" cssclass="NormalRed" display="Dynamic" errormessage="<br>Username Is Required."
controltovalidate="txtUsername" resourcekey="valUsername"></asp:requiredfieldvalidator></td>
Then go to the vb page and look for this.
Public Property UserName() As String
Get
UserName = txtUsername.Text
End Get
Set(ByVal Value As String)
_UserName = Value
End Set
End Property
Then just change the line UserName=txtUsername.Text to be UserName=txtEmail.Text
ANY TIME I make a small change like this in the system. I usually use some kind of unique rem statement so that I can easily do a search for things I've changed or removed. So like on the vb page mine would look like this with an extra .,. so I can find it.REM.,. UserName = txtUsername.Text
UserName = txtUsername.Text