BV Commerce Forum
»
BV Commerce Support
»
Development
»
Using email addresses for the username
Rank: Member
Joined: 8/28/2006(UTC) Posts: 8
|
Has anyone modifed their system to only use email addresses for account logins instead of the additional username?
|
|
|
|
Rank: Member
Joined: 9/1/2006(UTC) Posts: 43
|
If this is still an open quesion I have made that modification.
Rob Willhite
Enkeboll Designs
|
|
|
|
Rank: Member
Joined: 6/26/2007(UTC) Posts: 14
|
Hi Rob
Would be interested in how you made this mod as we're trying to achieve the same thing?
Did you also manage to update the Forgot Password section to require an email address instead of a username?
Thanks...
Shaun Campbell
LatestBuy
|
|
|
|
Rank: Member
Joined: 7/12/2007(UTC) Posts: 19
|
I made this mod on my site. First I went into ahe admin and chose the options tab, then site terms. I changed the site term for "username" to "email". Now, wherever it says Username it will now say email. I opened the cart/bvmodules/controls/newusercontrol.aspx page and changed it to say "Confirm Email" instead of "Email" for the original email field (it's somewhere around line 20, origionaly says text="Email". I did not want to change this in site terms as it would modify other parte of the site. Then, since the original field was already tested to be a valid email, I just tested to make sure they were the same.
I think this is a simple solution and works great for us.
Now you probably want the code to check that the the two fields are the same, so here it is:
<bvc5:BVCompareValidatorID="CompareValidator40"runat="server"ControlToCompare="UsernameField" ControlToValidate="EmailField"Display="Dynamic"ErrorMessage="Email and Confirmation Must Match."</P>ValidationGroup="NewUser"ForeColor=" "CssClass="errormessage"></bvc5:BVCompareValidator></P>
|
|
|
|
Rank: Member
Joined: 6/26/2007(UTC) Posts: 14
|
Hi there
Unless we're missing something, the problem with this mod is that when a customer updates their email address (thinking they've also updated their username), the username stays the same (i.e. the original / old email address). Could be a bit of an administration nightmare. Maybe some additional code to update the username whenever an email address is changes is needed?
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
Latestbuy, you are absolutely correct. I liked aqua-Man's idea so much that I made the update myself.
When you do the customization above to make User ID = Email, you also need to update the code behind for the MyAccount_ChangEmail.aspx page.
arount line 83 you will see the following:[color=red>][/color]Immediately after that addan additiona line: thisUser.UserName = inNewEmail.Text
(Since the "inNewEmail.text" box is already validated, there should be no problem unless by some freak chance somebody else who is currently in your system already has their user name set as someone elses email!)
I checked my bit of code to work, but you may want to verify it before going live with it. Good Luck!
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
Also, Using aqua-Mans code I get an error, but updating ID="CompareValidator40" to ID="CompareValidator1" seems to do the trick.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.