vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Email Login (https://vborg.vbsupport.ru/showthread.php?t=95915)

Logikos 09-23-2005 02:55 PM

I was requested this hack for a personal website that I'm making. The reason why I wanted to use email login was because I wanted to allow members to change there 'display name' anytime they want. Kinda like MySpace. You login with your email, then you can change your display name to what ever you want and anytime you want.

I also agree that its easier to login with emails. No one forgets there email address.... Or do they¿.. Anyway, I was hoping someone would create this for me as i don't have much time anymore as I used to.

I just wanted the login part to be hacked. When they register they still choose a username/password and enter there email addy. I would have to just hack the login.php file to check emails addresses in the database other then the username. Of course edit the navbar template for the form. It was a long shot so I said why not. If I do happen to create this, I will release it to the public.

Marco van Herwaarden 09-23-2005 03:01 PM

I have a slight feeling that a future vB version already might have this as a standard feature. But that is just guessing.

You would have to make 100% sure that there are no dupe mail addresses.

Marco van Herwaarden 09-23-2005 03:30 PM

1 File edit:
in file includes/functions_login.php, find:
PHP Code:

    if ($vbulletin->userinfo $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " TABLE_PREFIX "user WHERE username = '" $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'")) 

and replace by:
PHP Code:

    // Start hack login with mail address (MarcoH64)
    //    if ($vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'"))
    
if (!$vbulletin->userinfo $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " TABLE_PREFIX "user WHERE username = '" $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'"))
    {
        
$vbulletin->userinfo $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " TABLE_PREFIX "user WHERE email = '" $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'");
    }
    if (
$vbulletin->userinfo)
    
// End hack login with mail address (MarcoH64) 

This will allow logging in with either mail or username.

Protoman 09-23-2005 06:01 PM

sweet, you should release this hack! you did all the work :D

Marco van Herwaarden 09-23-2005 06:56 PM

Someone should first really test it. I only did this in a 2 minute job on my localhost and it seemed to work.

john1744 09-23-2005 07:02 PM

Live Wire, I would love that hack, the being able to change username part. I look forward to this immensely.

Protoman 09-23-2005 08:08 PM

well, I just tested it and it works great on PHP5 :)

sorry Live Wire if this thread sorta wandered off topic :nervous:
this code should get you half way there though

Logikos 09-23-2005 08:32 PM

Thanks Marco! :)

Boofo 09-23-2005 08:58 PM

Quote:

Originally Posted by MarcoH64
Someone should first really test it. I only did this in a 2 minute job on my localhost and it seemed to work.

I've seen what Marco can do with a simple comma, you might want to thoroughly test this first everyone. LOL

Protoman 09-23-2005 09:39 PM

I only see 1 situation that could cause a problem with this system.

I suggest doing the following: AdminCP> options > User Registration Options >
Set 'Illegal Usernames' to "@" (minus quotes)


All times are GMT. The time now is 07:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01064 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete