mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
removed double commit caused by merging branches/2.0-inform
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45625 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d7eefa9a67
commit
ed31f62913
@ -466,26 +466,6 @@ class Member extends DataObject {
|
||||
return false;
|
||||
}
|
||||
|
||||
static function createNewPassword() {
|
||||
if(file_exists('/usr/share/silverstripe/wordlist.txt')) {
|
||||
$words = file('/usr/share/silverstripe/wordlist.txt');
|
||||
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
srand($sec + ((float) $usec * 100000));
|
||||
|
||||
$word = trim($words[rand(0,sizeof($words)-1)]);
|
||||
$number = rand(10,999);
|
||||
|
||||
return $word . $number;
|
||||
} else {
|
||||
$random = rand();
|
||||
$string = md5($random);
|
||||
$output = substr($string, 0, 6);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Alias for {@link inGroup}
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user