PDA

View Full Version : Random Usergroup On Registration


yzztik
10-07-2002, 07:47 PM
I have a hack installed on my board that randomly places a new user in one of 6 groups upon registration. The problem is that I did not install the hack, it was my previous admin and he is now gone. I need to upgrade my board but can't seem to find the code for this hack to re-install it after I upgrade.

I have searched the board and cannot find it. Does someone know what it is or where I could find it?

I am not sure if the hack I had does this or not, but I would like it if it could somehow know how many people are in each of the 6 groups and place the new one in the group that has the less users in it.

If someone could write that for me or point me to a place where I could find this I would be forever grateful :) Thanks!

Xenon
10-07-2002, 07:59 PM
hmm, i found this old answer by me for a register in a random group:

https://vborg.vbsupport.ru/showthread.php?s=&threadid=42257&highlight=random+register.php

no, it doesn't find out in which group are the less.. people, because if it does, it wouldn't be random anymore ;)

yzztik
10-07-2002, 08:05 PM
oops sorry ... thanks ... I think I was looking in the full release forum and the hack database and it didnt find it. Though I could swear I use the search box on top too ... either way ... thanks a million for finding it for me :) I'll be sure to save it this time :)

Xenon
10-07-2002, 08:14 PM
:)
you're welcome

Remeber sometimes the best hacks can be found in the requestforum :)

Logician
10-08-2002, 10:26 AM
Originally posted by Xenon
Remeber sometimes the best hacks can be found in the requestforum :)
Sometimes?!? No way! Always! :p

We'll beat Full Releases soon.. :rambo:

Xenon
10-08-2002, 11:35 AM
I bet we'll do, pal :)

yzztik
03-21-2003, 08:39 PM
$newusergroupid=rand(xx,yy);

I have been using this to sort members into random usergroups when they register but this assumes that all groups are in order. How would I go about it if they were not?

For example, if I wanted them to be sorted randomly into groups 8, 10 and 11.

Any ideas?

Xenon
03-21-2003, 10:18 PM
use this way:
$ugid = array(8,10,11);
$newusergroupid=$ugid[rand(0,2)];

yzztik
03-21-2003, 10:39 PM
Thanks so much. So I can put as many numbers I want in the array list right?

Xenon
03-22-2003, 11:21 AM
yes, put as many numbers as you want in it, but don't forget to increase th second value of the rand function for every added number :)