Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Delayed Email Verification Hack (DEV) Details »»
Delayed Email Verification Hack (DEV)
Version: 1.00, by CharlesHe CharlesHe is offline
Developer Last Online: Oct 2006 Show Printable Version Email this Page

Version: 3.0.8 Rating:
Released: 08-24-2005 Last Update: Never Installs: 1
 
No support by the author.

This hack allows newly registered users awaiting email activation to use the forums, but then restricts them from logging in after a certain period of time and informing them that the time limit has passed.

My forum is designed for a close community of students, but I still want email verification to prevent abuse. But my forum isn't established yet, and I don't want to scare people off by forcing them to check their email. I would like them to check out the forums and get used to them for a while before forcing them to do more work. So I've made this hack that should allow for a delay in email verification of one day.

Two files need to be modified and an extra phrase must be added.

There are some flaws: In theory because this only restricts login, someone could stay logged on past the grace period, but a higher degree of rigour restricting this exploit would not be appropriate for a delayed email verification anyways.

I've been programming for approximate 1 day. If anyone can teach me how to write admincp functions that allow some customization over the grace periods, or teach me how write a program to install this hack that would be great.

Replace this code in /login.php

Code:
if (!verify_authentication($username, $password, $md5password, $md5password_utf, true))
	{
		// check password
		exec_strike_user($bbuserinfo['username']);

		if ($logintype === 'cplogin' OR $logintype === 'modcplogin')
		{
			// log this error if attempting to access the control panel
			require_once('./includes/functions_log_error.php');
			log_vbulletin_error($username, 'security');
		}
		$bbuserinfo = array(
			'userid' => 0,
			'usergroupid' => 1
		);
		eval(print_standard_error('error_badlogin'));
	}
With

Code:
if (!verify_authentication($username, $password, $md5password, $md5password_utf, true))
	{
		// check password
		exec_strike_user($bbuserinfo['username']);

		if ($logintype === 'cplogin' OR $logintype === 'modcplogin')
		{
			// log this error if attempting to access the control panel
			require_once('./includes/functions_log_error.php');
			log_vbulletin_error($username, 'security');
		}
		//normally only failed password, now there is the possibility of expired grace period
		//new error given if variables used in grace period checking are active
		if($bbuserinfo['joindate'] == 1984)
		{
			$bbuserinfo = array(
			'userid' => 0,
			'usergroupid' => 1
		);
			eval(print_standard_error('error_expired_grace_verification'));
		}
		else
		{
			$bbuserinfo = array(
			'userid' => 0,
			'usergroupid' => 1
		);
			eval(print_standard_error('error_badlogin'));
		}
	}
In includes/functions_login.php...

Insert before
Code:
 if ($send_cookies)
(approximate line 147)
With this this code :
Code:
//check to see if user need verification
		elseif($bbuserinfo['usergroupid'] == 3)
		{
	   // Calculate days since joining
		$bbuserinfo = $DB_site->query_first("SELECT joindate FROM " . TABLE_PREFIX . "user WHERE username = '" . $bbuserinfo['username'] . "'");
		$currentday = time();
		$dayspassed = ($currentday - $bbuserinfo[joindate])/(60*60*24);
//this is where grace period is controlled enter a number in days after the >=
			if($dayspassed >= 1)
			{
				$bbuserinfo['joindate'] = 1984; //used for verifying type of error
				return false;
				
			}
		}
Finally you need to do an SQL to add this new error phrase:

UPDATE `phrase` SET `text` = 'You may not login to the forums over one day after registering without activating your account. <br><br>

Activation should be easy. Please check your email to find the instructions to activate your account.
<br><br>
If you''re still having problems, please contact the administrator of the board at $vboptions[webmasteremail].' WHERE `phraseid` = '12302' LIMIT 1;

Show Your Support

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

Comments
  #2  
Old 08-26-2005, 07:16 PM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have to attach a text version of this hack as per vbulletin.org TOS.

Good work on your hack!

-dndog
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 06:51 PM.


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.03528 seconds
  • Memory Usage 2,203KB
  • Queries Executed 15 (?)
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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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_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