vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   register.php (https://vborg.vbsupport.ru/showthread.php?t=46058)

JulianD 11-25-2002 01:38 AM

I'm a little bit confused here. In my first post in this thread, I told you to use the $bbuserinfo[] array, but you told me that it didn't work. And now, you say it's working?

The fields displayed by $bbuserinfo are correct? If so, you don't need to hack register.php, leave the file unchanged.

mishkan 11-25-2002 01:56 AM

That's correct. Before I inserted the php code you gave me, into the register.php file, the $bbuserinfo[] array didn't work! See my post # 4 above, to see that the variables didn't display any data.

After I inserted the php code you gave me, the $bbuserinfo[] array works.

Doesn't this count as a "hack" to the register.php file?
Or is this called something else?

JulianD 11-25-2002 02:02 AM

Strange... The modifications I told you doesn't modify the $bbuserinfo array...

Try to undo the changes I told you, and see if it still works.

mishkan 11-25-2002 02:11 AM

Okay... on my way to revert the register.php file. :)

mishkan 11-25-2002 02:19 AM

Okay, I deleted that one line of php code, from the register.php file.

I kept the error_moderateuser template code the way it was.
PHP Code:

 field 5 $bbuserinfo[field5] <br>
field 6 $bbuserinfo[field6] <br>
username $bbuserinfo[username] <br>
email $bbuserinfo[email] <br>
================== <
br>
field 5 $field5 <br>
field 6 $field6 <br>
email $email <br>
================== <
br>
field 5 $userprofile[field5] <br>
field 6 $userprofile[field6] <br>
email $userinfo[email] <br>
================== <
br
<
br>
Thank you for registering$username

And here's what was displayed by the error_moderateuser template.

[color=sky blue]field 5 =
field 6 =
username = Unregistered
email =
==================
field 5 =
field 6 =
email =
==================
field 5 =
field 6 =
email = my-email-address@my-domain.com
==================

Thank you for registering, test.
[/color]


The only variables that work now, are these...

- email = $userinfo[email]

- username = $username

mishkan 11-25-2002 10:00 PM

Julian, you're not giving up, are you? :cry:

JulianD 11-25-2002 11:22 PM

No, I'm not giving up... hehe.. :)

Well... I did some modifications to my register.php and it should work now.

I had to add an extra query to the database to get the user information from the database... I hope you don't mind :)


In register.php find:

PHP Code:

if ($moderatenewmembers) { 

After it, add:

PHP Code:

        $userdata getuserinfo($userid); 


In the same file, find:

PHP Code:

            $DB_site->query("UPDATE user SET usergroupid=4$dotitle WHERE userid='$u'"); 

after it, add:

PHP Code:

      $userdata getuserinfo($u); 


And now, in error_moderateuser you can use:

$userdata[username] to get the user name
$userdata[email] to get the email
$userdata[field5] to get userfield 5, etc...

Tell me if it works.

JulianD 11-25-2002 11:25 PM

BTW, nice avatar :p

mishkan 11-25-2002 11:41 PM

Thank you for sticking with me. I really appreciate your help. :)

Okay, should I also put the code back in, that you gave me in post # 9? I have to get off the computer now, but I'll try all your suggestions tomorrow! I'll let you know right away how it goes.

And thanks for the compliment on my avatar. Yours is great too. It looks like it should be in a museum! ;)

JulianD 11-25-2002 11:45 PM

No, don't use the old code I gave you. You only have to follow the instructions in my last post :)


All times are GMT. The time now is 08:03 AM.

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.01683 seconds
  • Memory Usage 1,745KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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