Re: Question about user management...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux