Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Login by Email Address???

edited February 2009 in Vanilla 1.0 Help
Does anyone know of a way to modify Vanilla to allow logging in by email address instead of username? Any changes would also require the user being able to reset their password (if they forgot it) by email address as well. The reason why I'm wanting to do this is because I developed my current with having the user login with their email address. I can migrate my existing userbase over, but then I'm stuck without them knowing their username. I thought about populating the username with their email address like the Google Login extension does, but then this allows for all other members to see these users' email addresses. I really don't want to require everyone to create a new account because I have existing data from the current website that I need to tie together with their migrated accounts and the only way I can do this is if I do the migration instead of them registering a new account. Any help is appreciated. Thanks, Dave

Comments

  • Options
    Okay, with a lot of hacking through the code, I figured it out. I changed the login process to use email address, password reset request form uses email address and changing your email address in your account makes sure it doesn't already exist for someone else's account. I'm also using WallPhone's Duplicate Email Check for the registration page. I've only been playing with Vanilla for three days, so I did hacks directly in the code until I can learn how constructing plugins work. Surprisingly, looking through the code, figuring out what to change and debugging only took me a little over two and a half hours. Files I changed: /library/People.Control.PasswordRequestForm.php /library/People.Control.SignInForm.php /library/People.Class.UserManager.php /library/People.Class.Authenticator.php /themes/people_signin_form_nopostback.php /themes/people_password_request_form_nopostback.php I THINK that's all I changed. I tried keeping all the files open that I modified until I was completely done. Fixed a bug in Wallphone's script on line 26 where $UserManager was spelled $UserNamager. I also changed his error message to exclude showing the username of the account that currently is using the email address already. I didn't actually change the theme files in the theme folder. I copied them to my own theme folder and modified them there. In most of the cases, I duplicated the function name and renamed it. I then called my new function name in the other areas I had to change. I did this to avoid any conflicts in case something else in the code was calling the same function. I didn't want to break that section of the code. I know, reprimand me for changing some of the core files, but since I don't know how to write a plugin yet, I didn't have a choice. - Dave
Sign In or Register to comment.