mirror of
https://github.com/typecho/typecho.git
synced 2025-01-29 10:21:11 +01:00
replace hash module with PasswordHash
This commit is contained in:
parent
10d23e0e5f
commit
4f22194222
@ -358,8 +358,9 @@ list($prefixVersion, $suffixVersion) = explode('/', $currentVersion);
|
||||
|
||||
/** 初始用户 */
|
||||
$password = empty($config['userPassword']) ? substr(uniqid(), 7) : $config['userPassword'];
|
||||
$hasher = new PasswordHash(8, true);
|
||||
|
||||
$installDb->query($installDb->insert('table.users')->rows(array('name' => $config['userName'], 'password' => Typecho_Common::hash($password), 'mail' => $config['userMail'],
|
||||
$installDb->query($installDb->insert(‘table.users’)->rows(array(‘name’ => $config[‘userName’], ‘password’ => $hasher->HashPassword($password), ‘mail’ => $config[‘userMail’],
|
||||
'url' => 'http://www.typecho.org', 'screenName' => $config['userName'], 'group' => 'administrator', 'created' => Typecho_Date::gmtTime())));
|
||||
|
||||
unset($_SESSION['typecho']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user