aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes
diff options
context:
space:
mode:
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