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-23-2005 10:00 PM

Login by username or email
 
1 Attachment(s)
This code modification was made as part of a request in this thread: https://vborg.vbsupport.ru/showthrea...5&page=1&pp=15

All that it does is allow to use the email address instead of the username to be used to login (username also still works).

Since people where stating that it should be released, well here it goes.

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.

nexialys 09-24-2005 07:14 PM

good idea, anyway, this is only a if statement to add, so it's not complicated to enhance if needed (like register by email only...)

Marco van Herwaarden 09-24-2005 07:24 PM

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

Lurk 09-24-2005 07:31 PM

Wow, this is awesome.. except I won't be using it, maybe later. I like the concept and idea, it can be like a passport system if you integrate it into many sites. ;) :p

Marco van Herwaarden 09-24-2005 07:36 PM

Just a pitty it has to be a code change.

deathemperor 09-25-2005 02:07 PM

how about extend this to allow userid logging ?

Marco van Herwaarden 09-25-2005 03:58 PM

How you mean? Log what about a userid?

This is a simple code mod that make it possible to login with email address, there is no logging involved in this, and there won't be also.

nexialys 09-25-2005 04:08 PM

i think he was referring to login via with our userid indead of email or username... this becomes a little useless here... who remembers their userid better than their username?!

Marco van Herwaarden 09-25-2005 07:10 PM

Lol, well logging in with userid could be done the same way, but it won't be easier to remember.

deathemperor 09-26-2005 06:41 AM

Quote:

Originally Posted by nexialys
i think he was referring to login via with our userid indead of email or username... this becomes a little useless here... who remembers their userid better than their username?!

me and most of my member

ppl who have joined for a long period of time would remember it.

well whatever, just an idea


All times are GMT. The time now is 06:03 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.01136 seconds
  • Memory Usage 1,747KB
  • 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