aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes
diff options
context:
space:
mode:
authorwinter2025-03-20 22:17:38 +0000
committerwinter2025-03-20 22:17:38 +0000
commitb5c4e99cb1a2e5bb5cf6d38192d677843b1acd80 (patch)
tree3aee1e8b4961abe6e8c6b84913b04c9396b11b4e /routes
parentc10a1ea700a94e4eff8b10985cd402943ad07859 (diff)
fix various htmx navigation / page reloads
also i added a UserAccount::setPassword because i felt like it
Diffstat (limited to 'routes')
-rw-r--r--routes/preferences.php2
-rw-r--r--routes/user_auth.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/routes/preferences.php b/routes/preferences.php
index 95e7228..8ccf74e 100644
--- a/routes/preferences.php
+++ b/routes/preferences.php
@@ -38,7 +38,7 @@ Router::getInstance()->mount('/fragment/changePassword', function (array $args)
} elseif ($_POST['new'] != $_POST['newRepeat']) {
$error = 'doesntMatch';
} else {
- $user->passwordHash = defaults_password_hash($_POST['new']);
+ $user->setPassword($_POST['new']);
$user->save();
$success = true;
}
diff --git a/routes/user_auth.php b/routes/user_auth.php
index 49e138b..3c3b76c 100644
--- a/routes/user_auth.php
+++ b/routes/user_auth.php
@@ -19,7 +19,7 @@ Router::getInstance()->mount('/login', function (array $args) {
// success
$session = Session::create($user);
$session->setCookie(isset($_POST['rememberSession']));
- throw new TemporaryRedirect('/');
+ throw new TemporaryRedirect('/feed/home?fl=1');
}
}
@@ -37,5 +37,5 @@ Router::getInstance()->mount('/logout', function (array $args) {
$session->clearCookie();
$session->remove();
}
- throw new TemporaryRedirect('/');
+ throw new TemporaryRedirect('/feed/global?fl=1');
}); \ No newline at end of file