Skip to content

Commit

Permalink
新規インストール直後のパスワード変更を回避
Browse files Browse the repository at this point in the history
  • Loading branch information
yama committed Jun 9, 2013
1 parent 25e6684 commit fa14722
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zc_install/includes/classes/installer.php
Expand Up @@ -660,7 +660,8 @@ function validateAdminSetup($data) {

function dbAdminSetup() {
$this->dbActivate();
$sql = "update " . DB_PREFIX . "admin set admin_name = '" . $this->configInfo['admin_username'] . "', admin_email = '" . $this->configInfo['admin_email'] . "', admin_pass = '" . zen_encrypt_password($this->configInfo['admin_pass']) . "', pwd_last_change_date = 0, reset_token = '" . (time() + (72 * 60 * 60)) . '}' . zen_encrypt_password($this->configInfo['admin_pass']) . "' where admin_id = 1";
$pwd_last_change_date = strftime('%Y-%m-%d %H:%M:%S');
$sql = "update " . DB_PREFIX . "admin set admin_name = '" . $this->configInfo['admin_username'] . "', admin_email = '" . $this->configInfo['admin_email'] . "', admin_pass = '" . zen_encrypt_password($this->configInfo['admin_pass']) . "', pwd_last_change_date = '{$pwd_last_change_date}' where admin_id = 1";
$this->db->Execute($sql) or die("Error in query: $sql".$this->db->ErrorMsg());

// enable/disable automatic version-checking
Expand Down

0 comments on commit fa14722

Please sign in to comment.