Hi
I've got a question here, how do i validate custom field data before it get's updated into the database?
This is found inside,
profile.php
PHP Code:
// easy stuff
$userdata->set('birthday', $vbulletin->GPC);
$userdata->set('showbirthday', $vbulletin->GPC['showbirthday']);
// how should i add my validators here making sure that it matches the records i want to match?
// custom profile fields
$userdata->set_userfields($vbulletin->GPC['userfield']);
please guide me on track!
thanks.
Forget about this thread, i solved it.
worked on profile.php directly and manage to do what i need.
Here's the code if anybody needs it infuture.
PHP Code:
/*
# Modification
*/
require_once(DIR . '/includes/functions_bx_kky.php');
// validate registered key
$bx_kky = $vbulletin->GPC['userfield']['field8'];
if (!empty($bx_kky)) {
if (!validate_username($username)) {
eval(standard_error(fetch_error('invalid_username')));
$tb_regkey = '';
}
$vbulletin->GPC['userfield']['field8'] = $bx_kky;
}
/*
# End of Modification
*/
ignore my variable namings here, cuz i purposely messed it up.