vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I limit registration based upon email address? (https://vborg.vbsupport.ru/showthread.php?t=112235)

beansbaxter 04-05-2006 04:50 PM

How do I limit registration based upon email address?
 
Is it possible to setup new user registration only to email users who have certain email addresses?

An example: When a new user signs up, if they have an email address ending in yahoo.com then they can register and their account is enabled. If a user signs up with a hotmail.com email address, they can be registered but there accounts are not enabled unless they pay some sort of one-time fee.

Can this be done with vbulletin?

Hanoifishing 12-27-2007 07:10 AM

Anybody have a solution for this.
My question's more simply than that.
Can VBB limit email register by one domain?
Example: Only users have an email ending in "abc.com" can register to my forum?
How can i do that?
Waiting for your replies!

WhaLberg 12-27-2007 02:24 PM

Hanoifishing, yes, it is possible with a plugin. Add these codes to register_form_complete hook.

PHP Code:

// allowed email address.
$domain "domain.com";
// check if the user is using the allowed email address.
if (strpos($vbulletin->GPC['email'], $domain) === false)
{
    eval(
standard_error(fetch_error('you_are_not_allowed_to_register')));


Add a phrase under "Error Messages" and enter "you_are_not_allowed_to_register" for varname and enter your message that you want to appear or feel free to change the error message.

That's all. Good luck.

Hanoifishing 12-27-2007 11:13 PM

I've done this and it run successfully.
Thank you very much.

WhaLberg 12-28-2007 08:50 AM

You are welcome. :)


All times are GMT. The time now is 11:48 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.01164 seconds
  • Memory Usage 1,716KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete