マンコ
諏訪子 <suwako@076.moe>、2025-12-12 01:42
コミット 83a6d5c3de2b8d189801f4a58f6fc3fe34dfeff5
・親 95db2f7
・ファイルを見る
3個のファイル、+6 -5
| @@ -173,7 +173,6 @@ | ||
| 173 | 173 | $tmpl->assign('custCss', false); |
| 174 | 174 | $tmpl->assign('menu', $this->getMenu()); |
| 175 | 175 | $tmpl->assign('description', $description); |
| 176 | - $tmpl->assign('error', $error); | |
| 177 | 176 | $tmpl->assign('user', $user); |
| 178 | 177 | $tmpl->assign('u', $u); |
| 179 | 178 |
| @@ -189,7 +189,7 @@ | ||
| 189 | 189 | $user = new \stdClass; |
| 190 | 190 | $user->id = $lastId; |
| 191 | 191 | $user->username = $username; |
| 192 | - $user->password = password_hash($password, $algo); | |
| 192 | + $user->password = password_hash($password, $this->algo); | |
| 193 | 193 | $user->avatar = ''; |
| 194 | 194 | $user->email = $email; |
| 195 | 195 | $user->regDate = time(); |
| @@ -219,8 +219,8 @@ | ||
| 219 | 219 | return \Result::Error('エラー:ユーザー名又はパスワードが一致していません。'); |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | - if (password_needs_rehash($userData->password, $algo)) { | |
| 223 | - $userData->password = password_hash($password, $algo); | |
| 222 | + if (password_needs_rehash($userData->password, $this->algo)) { | |
| 223 | + $userData->password = password_hash($password, $this->algo); | |
| 224 | 224 | $path = $this->dataDir.$this->id.'.'.$userData->username.'.json'; |
| 225 | 225 | $json = json_encode($userData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 226 | 226 |
変更
util.php
| @@ -33,7 +33,9 @@ | ||
| 33 | 33 | |
| 34 | 34 | function kys(mixed $arg): void { |
| 35 | 35 | if (gettype($arg) == 'boolean') $arg = $arg === true ? 'true' : 'false'; |
| 36 | - foreach ($arg as $a) { if (gettype($a) == 'boolean') $a = $a === true ? 'true' : 'false'; } | |
| 36 | + if (gettype($arg) == 'array' || gettype($arg) == 'object') { | |
| 37 | + foreach ($arg as $a) { if (gettype($a) == 'boolean') $a = $a === true ? 'true' : 'false'; } | |
| 38 | + } | |
| 37 | 39 | echo '<style>html { color: #fcfcfc; background-color: #232023; } body { margin: 0; }</style>'; |
| 38 | 40 | echo '<header style="padding: 10px 0; display: flex; justify-content: space-evenly; background-color: #550f75; margin-bottom: 20px; position: sticky; top: 0;"><div><b>K</b>ILL</div> <div><b>Y</b>OUR</div> <div><b>S</b>ELF</div></header>'; |
| 39 | 41 | echo '<pre>'; |