diff --git a/src/Site/Controller/User.php b/src/Site/Controller/User.php
index c22dd07..f0055a4 100644
--- a/src/Site/Controller/User.php
+++ b/src/Site/Controller/User.php
@@ -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);
diff --git a/src/Site/Lib/Auth.php b/src/Site/Lib/Auth.php
index 4f6f80e..e3700c1 100644
--- a/src/Site/Lib/Auth.php
+++ b/src/Site/Lib/Auth.php
@@ -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);
diff --git a/util.php b/util.php
index d371950..65d38a3 100644
--- a/util.php
+++ b/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 '';
echo '
';