By Plaguester on
How do I set up the login so that users can log in with their email address and password rather than a user name? Thanks!
How do I set up the login so that users can log in with their email address and password rather than a user name? Thanks!
Comments
you cannot.
Drupal needs a valid email for various purposes. Amongst others to send lost passwords.
---
if you dont like the choices being made for you, you should start making your own.
---
[Bèr Kessels | Drupal services www.webschuur.com]
Bèr, your response does not
Bèr, your response does not seem to be properly related to the user's question. He wants the user email to also be used as the user's login name, which shouldn't prevent proper system usage of the user's email address...
Hmm, I see what you mean -
Hmm,
I see what you mean - there are a few sites I have accounts with where my username *is* my email address.
However I would not want that email address to be revealed to other users of the site - or worse to spam web crawlers trying to harvest email addresses.
Are you suggesting that users still have a normal username which is NOT their email address, but they dont need to enter that to log in - just their email address and password.
That shouldnt be too hard to implement but I dont know how without looking into it.
interesting idea..
Hi Plaguester
interesting idea..with more and more sites based on logins, it's getting more and more difficult for people to remember all their login details. Especially if, like most, some of those are pseudonym based.
I suppose one (fairly lenghty) way around it would be do the following:
The third step is a little lengthy..and I'm not sure which modules you need to hack...but, it's possible.
I can see the logic behind your question, though...it would be useful to have the option of logging in with a username + password or email address + password.
Mabe some of the more experienced might throw in their two cents on how to do this at the LOGIN stage..to avoid hacking. Although judging by the activity with Drupal CVS it might take a back seat to the more pressing issues.
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
an interesting problem with
an interesting problem with trying to implement email address support in the user module, is that Drupal is already setup to interpret %user%@%domain% as a reference to an affiliate website login. Hmm...
good point..
I never thought of that..good point intel. Does it do that even when you have the drupal.module disabled?
Either way, it's an interesting challenge that maybe better nailed at the LOGIN stage..i.e. Drupal accepts either
Username + Password or emailaddress+password to authenticate a user.
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
not sure yet, i was nosing
not sure yet, i was nosing through the code yesterday with intentions of hacking for email support, and noticed that was where support for drupal.module was implemented.
login is implemented in the user.module file, as is most (if not all) other handling of user information, so i'm thinking user.module is the file we'll have to edit for that functionality.
still trying to figure out best method to do this, so that it could be reusable and acceptable, lol
The Login Toboggan module
The Login Toboggan module allows users to log in with either username or email address.
http://drupal.org/node/34309
wow, nice find, thanks for
wow, nice find, thanks for that link
You're welcome:-)
You're welcome:-)
Not as lengthy as I feared.
I've just done this ...
... took me about an hour to hack to the code for the user.module file of version 4.6.5.
I'd like to post the code here for people to use, but every time I try a message pops up telling my input is "suspicious". I've tried wrapping it in <code> tags, but to no avail :-(
Can I see the code ?
Iam a new user to drupal and looking at a similar functionality
Can u paste the code or send me an email?
Email registration module
Just in case anyone else comes by here looking, see http://drupal.org/project/email_registration