vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Is This Possible?.... (https://vborg.vbsupport.ru/showthread.php?t=44520)

groovesalad 10-11-2002 08:43 PM

Is This Possible?....
 
I created a User Group named "DVD". Each one of the subscribers has a different Username but all of them have the same password. Is there a way that when they sign up with different usernames, but use a specific password, it'll register them under the DVD user group name?

Xenon 10-12-2002 09:04 AM

you know it's dangerous to give all the same password?
they can easily log in as someone else...

my tip: create a new customfield DVD-Password

then edit register.php and compare DVD-Passwordfield with the password you want for that group.
if they match, they'll be registred in this custom group

groovesalad 10-12-2002 01:43 PM

I have no idea how to do that.

Xenon 10-12-2002 06:52 PM

well create the new field in your AdminCP
Editable by user, but not viewable in profile

then open register.php find
PHP Code:

  $DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm,options,birthday,maxposts,startofweek,ipaddress,pmpopup,referrerid,nosessionhash,avatarid) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm','$options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid')"); 

before this add:
PHP Code:

if($fieldX=="password"$newusergroupid=xy

replace the X with the new fieldid and the xy with the usergroupid of your DVD group

not tested but should work

groovesalad 10-12-2002 07:12 PM

I know how to find out the usergroupid, but how do I figure out the fieldID number?

groovesalad 10-12-2002 07:16 PM

nevermind, I think I got it...testing now

groovesalad 10-12-2002 07:27 PM

Doesn't work unfortunately. It just registers them under "Registered" instead of "DVD"

Xenon 10-12-2002 10:11 PM

hmm, had a second look at the code and it should work perfectly...

Is your typing correct, the password is cassensitiv.

you can add an
PHP Code:

echo $fieldX;
exit; 

after if($fieldX=="password") $newusergroupid=xy;

to see if the content of the var is correct

groovesalad 10-12-2002 10:28 PM

when I put in the echo code, when I try to register and give the correct password, the page refreshes to just a blank page. I took out that code and tried again and it still just registers the user as "Registered" and not under "DVD". Weird. Maybe I have my numbers wrong, but I have the Field ID set to the DVD group when I added that group, and I have the New User Group ID set to the Forum number. Is this correct?

groovesalad 10-12-2002 10:51 PM

I even switched the numbers around and it still doesn't work.


All times are GMT. The time now is 08:31 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.01165 seconds
  • Memory Usage 1,743KB
  • 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
  • (3)bbcode_php_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
  • (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