Re: Question about user management...

From: Date: Mon, 10 Mar 2008 20:38:11 +0000
Subject: Re: Question about user management...
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-271233@lists.php.net to get a copy of this message
At 4:13 PM -0400 3/10/08, Jason Pruim wrote:
On Mar 10, 2008, at 4:07 PM, tedd wrote:
define("ADMIN", md5(uniqid(rand(), true));); define("GENERAL_USER", md5(uniqid(rand(), true));); define("LEVEL_ONE_USER", md5(uniqid(rand(), true));); define("LEVEL_TWO_USER", md5(uniqid(rand(), true));); define("WHATEVER_USER", md5(uniqid(rand(), true)););
with the chance to bring up an old thread about the universe not being random and everything being relational and all that... Any idea what the chances are that this would ever reproduce the same number? Or with the uniqid() portion will that check the other values?
I think the chances are very remote. You probably have a better chance of winning the lottery ten times in a row. On the other hand, if you assign the number yourself, your chances of making a mistake is far greater. But, now that I think about it -- you don't need a number at all, you could use: define("WHATEVER_USER","WHATEVER_USER"); The value portion in the define statement can be a string -- so cut to the chase and make it as difficult on yourself as you want. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#271233) next »