forked from typecho/typecho
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,7 +328,7 @@ function _u() | |
'ip' => '127.0.0.1', 'agent' => $options->generator, 'text' => '欢迎加入 Typecho 大家族', 'type' => 'comment', 'status' => 'approved', 'parent' => 0))); | ||
|
||
/** 初始用户 */ | ||
$password = substr(uniqid(), 7); | ||
$password = empty($config['userPassword']) ? substr(uniqid(), 7) : $config['userPassword']; | ||
|
||
$installDb->query($installDb->insert('table.users')->rows(array('name' => $config['userName'], 'password' => Typecho_Common::hash($password), 'mail' => $config['userMail'], | ||
'url' => 'http://www.typecho.org', 'screenName' => $config['userName'], 'group' => 'administrator', 'created' => Typecho_Date::gmtTime()))); | ||
|
@@ -463,6 +463,7 @@ function _u() | |
Typecho_Cookie::set('__typecho_config', base64_encode(serialize(array_merge(array( | ||
'prefix' => _r('dbPrefix'), | ||
'userName' => _r('userName'), | ||
'userPassword' => _r('userPassword'), | ||
'userMail' => _r('userMail'), | ||
'adapter' => $adapter, | ||
'siteUrl' => _r('userUrl') | ||
|
@@ -546,6 +547,11 @@ function _u() | |
<p class="description"><?php _e('请填写您的用户名'); ?></p> | ||
</li> | ||
<li> | ||
<label class="typecho-label" for="userPassword"><?php _e('登录密码'); ?></label> | ||
<input type="password" name="userPassword" id="userPassword" class="text" value="<?php _v('userPassword'); ?>" /> | ||
<p class="description"><?php _e('请填写您的登录密码, 如果留空系统将为您随机生成一个'); ?></p> | ||
</li> | ||
<li> | ||
<label class="typecho-label" for="userMail"><?php _e('邮件地址'); ?></label> | ||
<input type="text" name="userMail" id="userMail" class="text" value="<?php _v('userMail', '[email protected]'); ?>" /> | ||
<p class="description"><?php _e('请填写一个您的常用邮箱'); ?></p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters