View Full Version : Random Password Instead of Activation Code
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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=15987) 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.
Important: If you previously installed this hack, select the "upgrade" option and not the "new install"
Cheers,
Bira
Scott MacVicar
12-09-2001, 09:41 AM
I had already released a version for 2 over a month ago.
Scott
Note this is not as advanced as the one by bira
This is what you wrote on your hack.
This is the advanced one.
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 :)
all hail bira :)
one of the best hacks ever is back
thank you so much bira ;)
Thanks nuno http://www.atlasf1.com/bb/images/smilies/blush.gif
(I had a ****ty day, so that actually made me feel good. Thanks :))
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:
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 :)
only works if i remove field_exists checking in step 3
by dumping
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 {
[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 :)
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.
[QUOTE]Originally posted by nuno
no way
like i told you this hack was tested with a clean vBull 2.2.1 installation
hmm
vBull clean installation with one fresh database(vbulltest)
clicking UPGRADE will bypass 3 options at admin cp
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 :)
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.
:(
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|
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
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
[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.
:(
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 !! :)
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?
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
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.
[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".
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
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?
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!!
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
ok madhouse, I looked at your files and found your error :)
Open register.php and find (lines 42-48 in your script) :
// 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:
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:
// 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..
[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='".addslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslashes(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($customtext)."',email='".addslash es(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($pare ntemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($hom epage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlsp ecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($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
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='".intval($customtitle)."',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]',gender='$gender' $awaysql $changepw WHERE userid='$bbuserinfo[userid]'");
That will do the trick :)
ForYou
12-30-2001, 11:17 PM
Dear bira ,,,
Thank you alot for the first help ..
but there is sconed help and problems ..
in the register.php
your script line is :
if ($username=="" or $email=="" or $emailconfirm=="" or ($password=="" or $passwordconfirm=="" and $randpassword=="0")) {
and my register.php line is
if ($username=="" or $email=="" or $emailconfirm=="" or $password=="" or $passwordconfirm=="" or $country=="") {
please tell me how can i replaced your line with my line ..
regards
Note :
when i recieved the randome password there is wrong password is this problem or what ..
regards
and thanks alot and i'll promise you this is the last help from you to me :) thanks bira
if ($username=="" or $email=="" or $emailconfirm=="" or ($password=="" or $passwordconfirm=="" and $randpassword=="0") or $country=="") {
dunno what you did wrong elsewhere. The hack works just fine if you install it correctly :)
ForYou
12-30-2001, 11:43 PM
dear bira..
evry thing is ok now ..
but there is one problem with my new register user ..
when any user want register to my board and he recieved the password and try to login there is message (the password is wrong ) and if he request the new password he will get the true password and he can login the board ....i think this is a problem with me becuase my user need to request a new password ...
please if you can have any help tell me know about it ..
regards
ForYou can you please give me the URL to your forums?
Thanks
ForYou
12-30-2001, 11:54 PM
Ok bira ..
but my forum in arabic FONT ..i hope the arabic font not problem for you ..
any way my link is
http://montada.dardasha.net/montada/
i hope you can help me ..
regards
ok, send me to goren@atlasf1.com your register.php and member.php files pls
ForYou
12-31-2001, 12:11 AM
hello bira ..
i was send for you the files .....
waiting you help ...
regards
in your register.php line 489, this:
'".addslashes($password)."'
should be this:
'".addslashes(md5($password))."'
This by the way was NOT changed in this hack. You installed a pre-2.2.0 hack (you have several of them there) and overwrote the correct line, which dropped your md5() password ecryption.
ForYou
12-31-2001, 12:37 AM
Thank you alot bira .... you are the best
evry thing is OK now :)
happy new year :)
regards
Skyline_GT
07-23-2003, 05:21 AM
Hm..
how to make after they register, they are not logged in..
cuz I have tested myself, after you register, they are automactically logged in.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.