マンコ
This commit is contained in:
@@ -173,7 +173,6 @@ class User {
|
||||
$tmpl->assign('custCss', false);
|
||||
$tmpl->assign('menu', $this->getMenu());
|
||||
$tmpl->assign('description', $description);
|
||||
$tmpl->assign('error', $error);
|
||||
$tmpl->assign('user', $user);
|
||||
$tmpl->assign('u', $u);
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ class Auth {
|
||||
$user = new \stdClass;
|
||||
$user->id = $lastId;
|
||||
$user->username = $username;
|
||||
$user->password = password_hash($password, $algo);
|
||||
$user->password = password_hash($password, $this->algo);
|
||||
$user->avatar = '';
|
||||
$user->email = $email;
|
||||
$user->regDate = time();
|
||||
@@ -219,8 +219,8 @@ class Auth {
|
||||
return \Result::Error('エラー:ユーザー名又はパスワードが一致していません。');
|
||||
}
|
||||
|
||||
if (password_needs_rehash($userData->password, $algo)) {
|
||||
$userData->password = password_hash($password, $algo);
|
||||
if (password_needs_rehash($userData->password, $this->algo)) {
|
||||
$userData->password = password_hash($password, $this->algo);
|
||||
$path = $this->dataDir.$this->id.'.'.$userData->username.'.json';
|
||||
$json = json_encode($userData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
|
||||
|
||||
4
util.php
4
util.php
@@ -33,7 +33,9 @@ function uuid(): string {
|
||||
|
||||
function kys(mixed $arg): void {
|
||||
if (gettype($arg) == 'boolean') $arg = $arg === true ? 'true' : 'false';
|
||||
foreach ($arg as $a) { if (gettype($a) == 'boolean') $a = $a === true ? 'true' : 'false'; }
|
||||
if (gettype($arg) == 'array' || gettype($arg) == 'object') {
|
||||
foreach ($arg as $a) { if (gettype($a) == 'boolean') $a = $a === true ? 'true' : 'false'; }
|
||||
}
|
||||
echo '<style>html { color: #fcfcfc; background-color: #232023; } body { margin: 0; }</style>';
|
||||
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>';
|
||||
echo '<pre>';
|
||||
|
||||
Reference in New Issue
Block a user