PDA

View Full Version : External registration


zero_ZX
07-15-2012, 08:49 PM
Hi,
So I got my data manager:

$userdata =& datamanager_init('User', $this->vbulletin, ERRTYPE_ARRAY);
$userdata->set('email', $this->vbulletin->GPC['email']);
$userdata->set('username', $this->vbulletin->GPC['username']);
$userdata->pre_save();

But when I try to register it tells me that I cannot leave my email and username empty.
I'm not quite sure about why GPC clears my post data, any help is much appreciated.

kh99
07-15-2012, 10:05 PM
Did you call $vbulletin->input->clean_gpc() or $vbulletin->input->clean_array_gpc() to get the paramters and put them in $vbulletin->GPC[] ? Also, you're calling $this->vbulleitn, but maybe it's because your code is part of a class.

zero_ZX
07-16-2012, 09:25 AM
Thanks this helped and solved the issue :)
In the meantime I came onto another problem:
When my captcha fails I get no error message.
I see that I can use this:
$userdata->error('emailmismatch');
But what would the argument be for captcha?

kh99
07-16-2012, 10:44 AM
When my captcha fails I get no error message.
I see that I can use this:
$userdata->error('emailmismatch');
But what would the argument be for captcha?


The parameter is a phrase variable name, so you could create a phrase or use an existing one. There's one called humanverify_image_wronganswer that says "The string you entered for the image verification did not match what was displayed.".