The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello.
I was wondering if you could guide me on this. I need to know how can I show a custom error message when the user is registering. As I need to check the user existence in other system before registering, and that system is going to provide me an error message, I need to show that error as if it was from vBulletin (wrong username, wrong email and that sort of thing) Where should I look at? Thanks a lot in advance. |
#2
|
|||
|
|||
![]()
For the username, you could create a plugin using hook location register_addmember_process and code something like this:
Code:
if ($vbulletin->GPC['username'] is taken) { $userdata->error('usernametaken', htmlspecialchars_uni($vbulletin->GPC['username']), $vbulletin->session->vars['sessionurl']); } and you can probably do something similar for email or other fields. Also, the username is checked on the registration form page via a call to ajax.php, so you could create another plugin using hook ajax_start and code similar to the section that starts with Code:
if ($_POST['do'] == 'verifyusername') { |
#3
|
|||
|
|||
![]()
Thanks kh99.
Is there a way to disable the ajax user check? Regards. |
#4
|
|||
|
|||
![]()
Yes, edit the register template and search for vbulletin_ajax_nameverif.js. That should make it easy to find the block of code below and add the <vb:comment>...</vb:comment> tags around it:
Code:
<vb:comment> <script type="text/javascript" src="clientscript/vbulletin_ajax_nameverif.js?v={vb:raw vboptions.simpleversion}"></script> <script type="text/javascript"> <!-- regname_verif = new vB_AJAX_NameVerify('regname_verif', 'regusername'); //--> </script> </vb:comment> |
#5
|
|||
|
|||
![]()
Thanks a lot!
Regards. --------------- Added [DATE]1323879434[/DATE] at [TIME]1323879434[/TIME] --------------- The last one about registration ![]() How can I get the password without md5 applied? I see the $vbulletin->GPC['password'] but that is with md5 like $vbulletin->GPC['password_md5']. Thanks in advance! |
#6
|
|||
|
|||
![]()
You should be able to define DISABLE_PASSWORD_CLEARING, like:
Code:
define('DISABLE_PASSWORD_CLEARING', true); You could try putting it in a plugin, maybe using init_start. Or you could edit register.php and put it at the top. |
#7
|
|||
|
|||
![]()
I define that constant but I can get the password without md5 applied neither on the login nor registration. Maybe I'm using the wrong variable to get the clean password, I use the $vbulletin->GPC['vb_login_password'] variable in login and $vbulletin->GPC['password'] on registration.
--------------- Added [DATE]1323896650[/DATE] at [TIME]1323896650[/TIME] --------------- I found out that the: Code:
define('DISABLE_PASSWORD_CLEARING', true); Thanks a lot for your help kh99! |
#8
|
|||
|
|||
![]()
Ah, config.php - that's brilliant. I'm so used to thinking about how to do things without editing files that that never would have occurred to me.
|
#9
|
|||
|
|||
![]()
Hello kh99,
I have a similar requirement where in I want to customize the phrase - "usernametaken". 1)For an already existing user name the error should be - That username is already in use. If you are {1} and you have forgotten your password, click <a href="login.php?{2}do=lostpw">here</a>. 2)For special characters and space the error should be - That username does not meet the administrator's standards. Any idea how I do it? Have also raised it here - https://vborg.vbsupport.ru/showthread.php?t=304430 Thanks in advance. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|