Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Login via Email Details »»
Login via Email
Version: 1.00, by Till Till is offline
Developer Last Online: Aug 2007 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.7 Rating:
Released: 07-09-2007 Last Update: Never Installs: 8
 
No support by the author.

Ok, basically I wanted to allow users to login via email. This is cheap and straight to the point, so feel free to add to this.

Unfortunately I could not find a hook to use for this, so I hacked my login.html.

PHP Code:
if ($_POST['do'] == 'login')
{
    
$vbulletin->input->clean_array_gpc('p', array(
        
'vb_login_username' => TYPE_STR,
        
'vb_login_password' => TYPE_STR,
        
'vb_login_md5password' => TYPE_STR,
        
'vb_login_md5password_utf' => TYPE_STR,
        
'postvars' => TYPE_STR,
        
'cookieuser' => TYPE_BOOL,
        
'logintype' => TYPE_STR,
        
'cssprefs' => TYPE_STR,
    ));
    
    if (isset(
$_POST['vb_login_username'])) {
        
$status eregi(
                
"^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,5})$",
                
$vbulletin->GPC['vb_login_username']
        );
        if (
$status !== FALSE) { 
            
$query "SELECT username FROM vb3_user WHERE email = '%s'";
            
$query sprintf($query$vbulletin->GPC['vb_login_username']);

            
$_resp $db->query_read($query);
            
$_user $db->fetch_row($_resp);
            
$_user = (string) @$_user[0];
            
            if (empty(
$_user) === FALSE) {
                
$_POST['vb_login_username'] = $_user;
            }
            
//var_dump($_user, $vbulletin->GPC['vb_login_username']);
            //exit;
        
}
    }

     
// can the user login?
     // to be continued. 

Hope this helps someone.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-10-2007, 10:31 PM
radarhunter radarhunter is offline
 
Join Date: Jul 2006
Location: Punjab, India
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but atleast you could tell how to apply this mod ???
Reply With Quote
  #3  
Old 07-11-2007, 03:31 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this finished? how exactly can a user login through their email?
Reply With Quote
  #4  
Old 07-11-2007, 05:23 AM
succo succo is offline
 
Join Date: Sep 2003
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as far as i can see, this allows a user to login (in the forum website, of course) using the couple email_address/password instead of username/password

you need to edit login.php to make it work, changing the part starting with
Code:
if ($_POST['do'] == 'login')
Reply With Quote
  #5  
Old 07-11-2007, 05:33 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by succo View Post
as far as i can see, this allows a user to login (in the forum website, of course) using the couple email_address/password instead of username/password

you need to edit login.php to make it work, changing the part starting with
Code:
if ($_POST['do'] == 'login')
Thanks for the heads up, succo!

I edited the original post to make "login.html" bold.

So please, if anyone is interested, just read what I wrote. ;-)

Questions, comments, feedback? I am all ears.
Reply With Quote
  #6  
Old 07-11-2007, 07:42 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no explanation at all
Reply With Quote
  #7  
Old 10-10-2007, 05:44 PM
ianskate ianskate is offline
 
Join Date: Dec 2002
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice... im afraid to try this on my active forum but i might install another vb forum soon and will try it out on that.

i also have a related thread here asking the same topic but without hacking the source:
https://vborg.vbsupport.ru/showthrea...22#post1357022
Reply With Quote
  #8  
Old 01-25-2008, 02:00 PM
ianskate ianskate is offline
 
Join Date: Dec 2002
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for the record, this works very nicely.

to those whom say there is no explanation - u need to open the login.php file in ur forum folder on ur server, and just insert the code above where Till stated. its just a simple copy and paste, the only thing you need to edit is your user table name.

if you cant for some reason find that spot in your code, just do a search (ctrl + F) in the file for the line

Code:
if ($_POST['do'] == 'login')
and paste appropriately. :up:
Reply With Quote
  #9  
Old 10-31-2008, 02:20 PM
Ghanem's Avatar
Ghanem Ghanem is offline
 
Join Date: Aug 2004
Location: Bahrain
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, its working fine with 3.7.3 too
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:42 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06931 seconds
  • Memory Usage 2,293KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete