mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix deprecation warning with word_list
This commit is contained in:
parent
98ab540aba
commit
4b6a03bb0b
@ -675,8 +675,10 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
|||||||
* @return string Returns a random password.
|
* @return string Returns a random password.
|
||||||
*/
|
*/
|
||||||
public static function create_new_password() {
|
public static function create_new_password() {
|
||||||
if(file_exists(Security::get_word_list())) {
|
$words = Config::inst()->get('Security', 'word_list');
|
||||||
$words = file(Security::get_word_list());
|
|
||||||
|
if($words && file_exists($words)) {
|
||||||
|
$words = file($words);
|
||||||
|
|
||||||
list($usec, $sec) = explode(' ', microtime());
|
list($usec, $sec) = explode(' ', microtime());
|
||||||
srand($sec + ((float) $usec * 100000));
|
srand($sec + ((float) $usec * 100000));
|
||||||
|
@ -78,8 +78,12 @@ class Security extends Controller implements TemplateGlobalProvider {
|
|||||||
* @config
|
* @config
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected static $word_list = './wordlist.txt';
|
private static $word_list = './wordlist.txt';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @config
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private static $template = 'BlankPage';
|
private static $template = 'BlankPage';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user