vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Login by username or email (https://vborg.vbsupport.ru/showthread.php?t=96832)

Marco van Herwaarden 09-26-2005 07:02 AM

just replace email with userid and you're done.

mikehawk 11-09-2005 06:54 PM

Register by email would be good as well...

dcpaq2xx 01-05-2006 09:18 PM

I was doing some playing around with this hack and something that I noticed was that if you have more than one user name assigned to the same email address it cannot tell which one to login as and it logs you in on the first one in the user id list.

Other than that it seems to work fine.

Thank you for taking the time to create this hack Marco, Im still undecided as of right now though If ill be using this hack or not.

Doug

Marco van Herwaarden 01-19-2006 06:30 PM

Quote:

Originally Posted by dcpaq2
I was doing some playing around with this hack and something that I noticed was that if you have more than one user name assigned to the same email address it cannot tell which one to login as and it logs you in on the first one in the user id list.

Well that would make sense. I don't think this is the right hack if you allow multiple users (although they are probably all the same person) to share 1 mail address.

Tim Simms 05-12-2006 05:37 PM

Maybe instead of:
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) 

...you could do this:
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)) . "'"))
        {
                if ((
$result $vbulletin->db->query("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " TABLE_PREFIX "user WHERE email = '" $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'")) && $vbulletin->db->num_rows($result) > 1)
                {
                        
// Do some sort of notification to user
                        // saying that email address is ambiguous
                
}
                else
                {
                        
$vbulletin->userinfo $vbulletin->db->fetch_array($result);
                        
$vbulletin->db->free_result($result);
                }
        } 


I did it on ours, and at least it prevents a shared email address from logging into any of them. Of course, I don't have any feedback to the user, cuz I don't know how... :confused:

Marco van Herwaarden 05-13-2006 09:01 AM

That is a good suggestion and i might add it to a next (??) release.

Smiry Kin's 05-25-2006 07:19 AM

does this work on 3.5.4?

BaBa2002 05-28-2006 07:14 AM

Quote:

Originally Posted by MarcoH64
email only would even be easier, just replace 1 word in the original file.

what do you mean with just replace 1 word?
for just email registration? and witch word?

xr8d76 06-04-2006 07:56 AM

where/how do you add on the login boxes, instead of it just showing:

username:
Password:

TO

Username/Email:
Password:

Pls and thx

Smiry Kin's 06-04-2006 08:54 AM

Quote:

Originally Posted by xr8d76
where/how do you add on the login boxes, instead of it just showing:

username:
Password:

TO

Username/Email:
Password:

Pls and thx

search parse "User Name"

maybe?


All times are GMT. The time now is 06:04 PM.

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.01228 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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