Re: User Passwords: checking for unique chars

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

 



Alex Gemmell wrote:
> I'm checking user chosen passwords for validity and have created 7
> tests.  It's not 100% bulletproof but it will do for now.  My problem
> is with the last check "have 6 unique characters".  I'm at a loss at
> how to check for this in a neat one-liner.

if (count(count_chars($password, 1)) < 6) return false;

http://php.net/count_chars

No regex at all :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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