2012-04-24, 03:13 PM
Pages: 1 2
2012-04-24, 03:19 PM
You'll need to remove the validator from the field; I'll make the jQuery convert only check the confirmation if it exists.
As for the backend, you'll need a plugin to automatically populate the confirmation field with the original.
As for the backend, you'll need a plugin to automatically populate the confirmation field with the original.
2012-04-24, 03:27 PM
you mean remove username validation? or do i misunderstand?
2012-04-24, 03:27 PM
Here's how you do it:
In the member_register template, remove the 'email2' validator field and remove the 'match_field' option from the email validator field.
Then unfortunately you have a core edit; member.php line 700 (ish). You need to do the same thing and remove the match_field options and the 'password2' validator field.
Then you're just after a plugin that populates the values on register (hooking into member_do_register_start?).
In the member_register template, remove the 'email2' validator field and remove the 'match_field' option from the email validator field.
<!--
regValidator = new FormValidator('registration_form');
regValidator.register('username', 'notEmpty', {failure_message:'{$lang->js_validator_no_username}'});
regValidator.register('email', 'regexp', {regexp:'^([a-zA-Z0-9_\\.\\+\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$', failure_message:'{$lang->js_validator_invalid_email}'});
{$validator_extra}
regValidator.register('username', 'ajax', {url:'xmlhttp.php?action=username_availability', loading_message:'{$lang->js_validator_checking_username}'}); // needs to be last
// -->
Then unfortunately you have a core edit; member.php line 700 (ish). You need to do the same thing and remove the match_field options and the 'password2' validator field.
Then you're just after a plugin that populates the values on register (hooking into member_do_register_start?).
2012-04-24, 03:28 PM
thanks man!
who wants to make me the plugin? haha
who wants to make me the plugin? haha
2012-04-24, 03:33 PM
Simple.
If that doesn't work, CBA.
$plugins->add_hook('member_do_register_start', 'pluginname_do_register');
function pluginname_do_register()
{
global $mybb;
$mybb->input['email2'] = $mybb->input['email'];
$mybb->input['password2'] = $mybb->input['password'];
}
If that doesn't work, CBA.
2012-04-24, 03:44 PM
I don't even know what to do with that, man!
2012-04-24, 03:51 PM
Sheesh!
New PHP file in the ./inc/plugins directory, call it skipvalidator.php. Add and save:
New PHP file in the ./inc/plugins directory, call it skipvalidator.php. Add and save:
<?php
if(!defined('IN_MYBB'))
{
die('Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.');
}
if(THIS_SCRIPT != 'member.php' && !defined('IN_ADMINCP'))
{
return false;
}
$plugins->add_hook('member_do_register_start', 'skipvalidator_do_register');
function skipvalidator_info()
{
return array(
'name' => 'Skip Validator',
'description' => 'A plugin to skip confirmation of passwords and emails',
'website' => 'http://xekko.co.uk',
'author' => 'Tomm',
'authorsite' => 'http://xekko.co.uk',
'version' => '1.0',
'guid' => '',
'compatibility' => '*'
);
}
function skipvalidator_do_register()
{
global $mybb;
$mybb->input['email2'] = $mybb->input['email'];
$mybb->input['password2'] = $mybb->input['password'];
}
2012-04-24, 03:53 PM
P.S. Maybe use Patches to do the core edits so upgrades are easier?
2012-04-24, 04:04 PM
Thanks man. You're the best as always.
Pages: 1 2