vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   External registration (https://vborg.vbsupport.ru/showthread.php?t=285596)

zero_ZX 07-15-2012 08:49 PM

External registration
 
Hi,
So I got my data manager:
Code:

$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

Quote:

Originally Posted by zero_ZX (Post 2348601)
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.".


All times are GMT. The time now is 12:27 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.02167 seconds
  • Memory Usage 1,714KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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