vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Custom Form User Registration (https://vborg.vbsupport.ru/showthread.php?t=327469)

doc55 08-20-2019 08:47 PM

Quote:

Originally Posted by Dave (Post 2600291)
Check the file /core/vb/api/user.php line 1999, 2069 and 2083 and you'll see what I'm talking about.

OMG!!!!!!!!!!!!!! Your observation was the best help.
You are correct. The error was coming from the $canadminuser. But it was due to the setting in the user registration: Allow Multiple Registrations Per User". This was set to off. I turned it on and the magic happened.

THANK YOU SO MUCH. :up:

Dave 08-20-2019 08:54 PM

No problem, glad you got it working now. :)

doc55 08-20-2019 09:08 PM

Here is another question.
If I turn off "Allow New User Registrations" in the Admin CP, this script will not work.
I need to make sure that my users don't register directly in the vBulletin and they go through my custom registration form.
Is there a way that I could disable the user registration in vBulletin without affecting this script?

Dave 08-20-2019 09:16 PM

Well again if $canadminusers variable is true then it should work because it skips that entire check. It is directly connected to "$this->hasAdminPermission('canadminusers')". If you edit that vBulletin script and add a var_dump($canadminusers); before line 2069 where the check is performed, does it show true or false? That way you can check if the admin user that is logged in is in fact allowed to alter users.

You can also assign the user the "super admin" role which you can assign in the /core/includes/config.php file in the $config['SpecialUsers']['superadmins'] variable. When it's in that variable, it will pass any kind of permission check.


All times are GMT. The time now is 08:26 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.01113 seconds
  • Memory Usage 1,716KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete