vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Random Password Instead of Activation Code (https://vborg.vbsupport.ru/showthread.php?t=33068)

bira 12-08-2001 10:00 PM

As per request, this is verstion 2.0 of the Random Password hack.

I am starting a new thread for this, because users of vB 2.0.3 and down should use version 1.0 of this hack, whereas users if v.2.2.0 and up should use this version.

[hr]

Purpose: When a new user regsiters, he is e-mailed a password generated randomly. He will not be able to log in until he receives this e-mail and uses that password. (the same happens if an existing user changes his e-mail address).

After installing this hack, you will have three options essentially:

1) Don't verify the e-mail is valid.
In this case the user selects his own password and nothing is sent to him.

2) Verify the e-mail is valid by sending an activation code
This is how vBulletin works now: a user selects his own password during registration, and the BB Mailer sends him an activation code / link that he needs to use before he's able to post

3) Verify the e-mail is valid by sending a random password
In this case the user DOES NOT select a password but instead he receives a randomly generated password by e-mail. He will not be able to log in / post until he receives and uses this password.

Installation: download the attached installer and run it in your admin directory. All changes that need to be made manually to scripts and/or templates are listed there.

[high]Important: If you previously installed this hack, select the "upgrade" option and not the "new install"[/high]

Cheers,

Bira

Scott MacVicar 12-09-2001 09:41 AM

I had already released a version for 2 over a month ago.

Scott

bira 12-09-2001 09:57 AM

Quote:

Note this is not as advanced as the one by bira
This is what you wrote on your hack.

This is the advanced one.

Remi 12-09-2001 12:16 PM

Thank you very very much Bira

I wish my English is good enouph to tell you how I feel :D

Thank you from the buttom of my heart Bira, I realy mean it :)

bira 12-09-2001 03:45 PM

my pleasure, Remi :)

nuno 12-09-2001 04:55 PM

all hail bira :)
one of the best hacks ever is back
thank you so much bira ;)

bira 12-09-2001 05:13 PM

Thanks nuno http://www.atlasf1.com/bb/images/smilies/blush.gif

(I had a ****ty day, so that actually made me feel good. Thanks :))

nuno 12-09-2001 05:54 PM

dang it
ERROR! This hack is already installed on this system!

Click here to see additions to your vBulletin files and templates,
Or you can just Exit now :stupid: :stupid:

how come?i've made a clean install to test this hack and thats the message i get :(
help bira :eek:

bira 12-09-2001 05:59 PM

nuno, you already had the randpassword option added to the database from a previous installation (in 2.0.x). So you don't need to run the clean install but the upgrade.

The difference between the clean install and the upgrade is only that the install adds a new value to the setting table, whereas the upgrade does everything except for that.

Run the installer again and select upgrade :)

nuno 12-09-2001 06:01 PM

only works if i remove field_exists checking in step 3
by dumping
PHP Code:

if (field_exists("setting","varname","randpassword")) {
        echo 
"<br><br><b>ERROR!</b> This hack is already installed on this system!\n";
        echo 
"<br><br>".gotostep(5,0,0,1,"Click here")." to see additions to your vBulletin files and templates,\n";
        echo 
"<br>Or you can just ".gotostep(6,0,0,1,"Exit now")."\n";
    } else { 


nuno 12-09-2001 06:04 PM

[QUOTE]Originally posted by bira
nuno, you already had the randpassword option added to the database from a previous installation (in 2.0.x). So you don't need to run the clean install but the upgrade.

The difference between the clean install and the upgrade is only that the install adds a new value to the setting table, whereas the upgrade does everything except for that.

Run the installer again and select upgrade :)

bira 12-09-2001 06:05 PM

nuno don't do that!!!

This is an important check -- you MUST run the script as upgrade and NOT as install. I can't stress enough how important this is.

If you click on UPGRADE, you won't even reach step 3, you will be taken to step 4.

DO NOT change that code from the installer and run it as upgrade.

If you force the alter over a MySQL table, you can corrupt your tables.

bira 12-09-2001 06:06 PM

[QUOTE]Originally posted by nuno


no way
like i told you this hack was tested with a clean vBull 2.2.1 installation

nuno 12-09-2001 06:23 PM

hmm
vBull clean installation with one fresh database(vbulltest)
clicking UPGRADE will bypass 3 options at admin cp

bira 12-09-2001 06:27 PM

clicking 'Upgrade' skips step 3. The only thing happening in step 3 is the 'INSERT INTO setting' query, which adds the Admin Options setting variable.

If you get this error, it means that variable was already added to the database, so you can safely select upgrade only :)

nuno 12-09-2001 08:15 PM

okie dokie tx bira :)

SirSteve 12-11-2001 04:08 AM

I would like to install this but I have the ever popular Community Bulletin hack installed thus the code changes is different.

:(

MApI 12-11-2001 07:51 PM

Hi, never installed before this hack (so, with a clean db), receive durings installation same nuno's msg. Btw I installed hack running the upgrade option. Obs., now hack doesn't work. The question is: can I upgrade the upgraded new installation ? Yes ? How ? Thx, in adv, MAp|

Remi 12-14-2001 12:49 PM

Bira

I did every thing exactly as you have discribed, but it did not work.

I used the upgrade option because i was using the old vesion of the hack.

I registerd a name for testing the hack, but it is not sending a password so I chaged the option to "Moderate New Members" so I can send it manually, the email get sent but without a password.

I uninstall the hack and removed the old templates from the old version and tryed to install it a gain but without any luck.

Now
Even the option "Send New Users Random Password?" is not in the contro panel any more

please advice me what to do, and how can I remove any trace of the hack from the db so I can try the option "Install"

Thank you very much in advance

bira 12-15-2001 03:24 PM

ok, I fixed the installer file in the first post.

Download it again, upload it to your admin dir, and run UNINSTALL first.

Whether the UNINSTALL is successful or not, doesn't matter.

Once that is done, click 'back' and go to the first page of the installer and select NEW INSTALL.

Follow the instructions thereafter and you will be fine.

Sorry for the error.

Thanks,

Bira

bira 12-15-2001 04:34 PM

[QUOTE]Originally posted by SirSteve
I would like to install this but I have the ever popular Community Bulletin hack installed thus the code changes is different.

:(

Remi 12-15-2001 04:48 PM

The installer is working fine now but the hack still does not send a password. :p

Not only the hack does not work now, but even after you turn it off VB does not send a password after registration ( the normall way)

I will not upgrade to 2.2 unless this hack is working :D


Has any body got this Woking please !! :)

bira 12-15-2001 04:53 PM

Remi I installed it on a 2.2.1 Board without any problem at all.

Can you please e-mail me your 2.2.1 member.php, register.php and admin/functions.php files to goren@atlasf1.com?

bira 12-15-2001 07:16 PM

Remi,

I looked at your files. I even tested them on my own board. They are FINE.

Check to see that you have the following templates (and if necessary revert them to their original, if altered):

error_randpw
emailsubject_randpw
email_randpw
register_yespassword
register_nopassword

If these appear and you cannot get a password sent, then your SENDMAIL is not working on the server.

Cheers,

Bira

Remi 12-16-2001 05:26 AM

OK

It is working only if I set "Verify Email address in registration" AND "Send New Users Random Password?" both to "yes".

The problem now, It keep sending a password after the registration even if I set "Moderate New Members" to "yes"

The old version of the hack does not send a password untill the registration is moderated.

bira 12-16-2001 10:05 AM

[QUOTE]Originally posted by Remi
OK

It is working only if I set "Verify Email address in registration" AND "Send New Users Random Password?" both to "yes".

Remi 12-16-2001 02:26 PM

I can't be more thakfull Bira :)

Not only for the grait hack but also for your kind support and help

I am sure the problem in my db or in my brain :D

Thaks again Bira

malc 12-17-2001 08:37 PM

Hello,

I installed this hack on my forum I am recorded I well receive the mall with the password, but he says to me that my password is incorrect :confused: :confused: :confused:

please help me :)

( i have vbulletin 2.2.1 on ventures online virtual hosting )

Dalius 12-17-2001 09:06 PM

Am I the only one that got this to work? :confused:

madhouse 12-19-2001 12:12 AM

Ok i installed this but the problem is i am not getting an error but there is no selection nor place for userpassword any more...whats wrong there?

bira 12-19-2001 12:18 AM

madhouse - if you select in Options, in Admin CP, to "verify e-mail" (yes) and "send random password instead of activation code" (yes) -- then you are NOT supposed to be able to enter a password: one will be mailed to you.

madhouse 12-19-2001 12:35 AM

Ok i got that much but even when i select the send user random password ...i created a temp account and its saying wrong password and this is the password the database generated...
Also when i elect to go to the email activation code...there is no longer a password box there for them to create a password...
So what gives there?
By the way thanks for the fast response!!

bira 12-19-2001 01:25 AM

madhouse, I can only presume that you missed something in the installation. If you send me all the relevant files (member.php, register.php and admin/functions.php) I'll take a look and see if anything is missing there. My e-mail is goren@atlasf1.com

madhouse 12-19-2001 02:04 AM

Files sent .......THanks

bira 12-19-2001 02:08 AM

ok madhouse, I looked at your files and found your error :)

Open register.php and find (lines 42-48 in your script) :

Code:

    // Send Random Password Instead of Activation Code (v2.0)
      if ($randpassword=="1") {
        eval("\$register_passwordbit = \"".gettemplate('register_nopassword')."\";");
      } else {
        eval("\$register_passwordbit = \"".gettemplate('register_yespassword')."\";");
      }   
// Send Random Password Instead of Activation Code (v2.0)

You placed this code in the WRONG place. Cut it out of the script and paste it BEFORE:

Code:

      if ($who=="adult") {
        eval("dooutput(\"".gettemplate("registeradult")."\");");
      } else {
        eval("dooutput(\"".gettemplate("registercoppa")."\");");
      }

(on line 199 in your script after cutting the above code).

So the end result will be:

PHP Code:

// Send Random Password Instead of Activation Code (v2.0)
      
if ($randpassword=="1") {
         eval(
"\$register_passwordbit = \"".gettemplate('register_nopassword')."\";");
      } else {
         eval(
"\$register_passwordbit = \"".gettemplate('register_yespassword')."\";");
      }    
// Send Random Password Instead of Activation Code (v2.0)

      
if ($who=="adult") {
        eval(
"dooutput(\"".gettemplate("registeradult")."\");");
      } else {
        eval(
"dooutput(\"".gettemplate("registercoppa")."\");");
      } 

This will fix your problem

madhouse 12-19-2001 05:17 PM

Thank bira...that fixed that,now i know i am in the wrong area to ask this but has anyone seen the welcome panel hack here?I saw it a while back but now its like it has disappeared..

malc 12-21-2001 09:23 AM

[QUOTE]Originally posted by malc
Hello,

I installed this hack on my forum I am recorded I well receive the mall with the password, but he says to me that my password is incorrect :confused: :confused: :confused:

please help me :)

( i have vbulletin 2.2.1 on ventures online virtual hosting )

ForYou 12-22-2001 12:04 AM

ther is ERROR like this

Parse error: parse error in /home/virtual/montada/home/httpd/html/montada/member.php on line 593

Help me

Regards

ForYou 12-30-2001 10:19 PM

Hello bira,
how can i placed this line with my line in member.php

your script line is :

$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]'$changepw WHERE userid='$bbuserinfo[userid]'");

my member.php line like this

$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='$customtitle',usertitle='".addslashes($cu stomtext)."',email='".addslash es(htmlspecialchars($email))."',parentemail='".add slashes(htmlspecialchars($pare ntemail))."',coppauser='$coppauser',homepage='".ad dslashes(htmlspecialchars($hom epage))."',icq='".addslashes(htmlspecialchars($icq ))."',aim='".addslashes(htmlsp ecialchars($aim))."',yahoo='".addslashes(htmlspeci alchars($yahoo))."',usergroupi d='$bbuserinfo[usergroupid]',country='".addslashes($country)."', gender='$gender' $awaysql WHERE userid='$bbuserinfo[userid]'");

there is install gender hack and away message hack ..

please help me

Regards

bira 12-30-2001 11:10 PM

$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',customtitle='".intval($c ustomtitle)."',usertitle='".addslashes($customtext )."',email='".addslashes(htmlspecialchars($email)) ."',parentemail='".addslashes(htmlspecialchars($pa rentemail))."',coppauser='$coppauser',homepage='". addslashes(htmlspecialchars($homepage))."',icq='". addslashes(htmlspecialchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))."',usergroupid='$bbus erinfo[usergroupid]'[high],gender='$gender' $awaysql $changepw[/high] WHERE userid='$bbuserinfo[userid]'");

That will do the trick :)


All times are GMT. The time now is 04:45 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.01611 seconds
  • Memory Usage 1,839KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (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
  • (40)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