vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Restrict usernames to alphanumeric and underscore (https://vborg.vbsupport.ru/showthread.php?t=73559)

Reynaldovb 02-01-2006 04:04 AM

It would probably work but it is not recommended, and my knowledge about how vB 3.5+ works is not as good as I would want to. I could try to port it next weekend as I need it for my forums too. :-(

Reynaldovb 02-01-2006 07:13 AM

Well, what do you know? I decided to give it a try and in just a few minutes I had a working version for vB 3.5.x :-)

https://vborg.vbsupport.ru/showthread.php?t=106877

Roms 02-14-2006 12:51 AM

Thanks, Works great!! Cheers!

josiespencer 09-16-2006 05:04 PM

I couldn't find your original anchor point in register.php so I put it in the code just after referrer and before the image check. It looks like this:

PHP Code:

// check referrer
if ($vbulletin->GPC['referrername'] AND !$vbulletin->userinfo['userid'])
{
$userdata->set('referrerid'$vbulletin->GPC['referrername']);
}

//-------------------------------------------------- 
// check username does not contain UNWANTED characters 
if (preg_match('/[^a-zA-Z0-9\_]+/'$_POST['username'])) 

    
//eval(print_standard_error('error_username_semicolon')); 
    
eval('$errors[11] = "' fetch_phrase('username_invalidchars'PHRASETYPEID_ERROR) . '";'); 

//-------------------------------------------------  

// Check Reg Image
if ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype'])
{
    require_once(
DIR '/includes/functions_regimage.php');
    if (!
verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
    {
    
$userdata->error('register_imagecheck');
      }


But it doesn't work. I was able to add Sister Mary Sunshine no problem. Any clue?

Daniel 09-29-2007 05:46 AM

Quote:

Originally Posted by josiespencer (Post 1076355)
I couldn't find your original anchor point in register.php so I put it in the code just after referrer and before the image check. It looks like this:

PHP Code:

// check referrer
if ($vbulletin->GPC['referrername'] AND !$vbulletin->userinfo['userid'])
{
$userdata->set('referrerid'$vbulletin->GPC['referrername']);
}

//-------------------------------------------------- 
// check username does not contain UNWANTED characters 
if (preg_match('/[^a-zA-Z0-9\_]+/'$_POST['username'])) 

    
//eval(print_standard_error('error_username_semicolon')); 
    
eval('$errors[11] = "' fetch_phrase('username_invalidchars'PHRASETYPEID_ERROR) . '";'); 

//-------------------------------------------------  

// Check Reg Image
if ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype'])
{
    require_once(
DIR '/includes/functions_regimage.php');
    if (!
verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
    {
    
$userdata->error('register_imagecheck');
      }


But it doesn't work. I was able to add Sister Mary Sunshine no problem. Any clue?

Bump. Anyone? :p


All times are GMT. The time now is 12:47 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.01129 seconds
  • Memory Usage 1,752KB
  • 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
  • (5)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