aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers')
-rw-r--r--app/Controllers/authController.php16
-rw-r--r--app/Controllers/errorController.php6
-rw-r--r--app/Controllers/userController.php8
3 files changed, 19 insertions, 11 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index e7bff363e..342c577e2 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -141,9 +141,11 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
);
if ($ok) {
// Set session parameter to give access to the user.
- Minz_Session::_param('currentUser', $username);
- Minz_Session::_param('passwordHash', $conf->passwordHash);
- Minz_Session::_param('csrf');
+ Minz_Session::_params([
+ 'currentUser' => $username,
+ 'passwordHash' => $conf->passwordHash,
+ 'csrf' => false,
+ ]);
FreshRSS_Auth::giveAccess();
// Set cookie parameter if nedded.
@@ -190,9 +192,11 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
$ok = password_verify($password, $s);
unset($password);
if ($ok) {
- Minz_Session::_param('currentUser', $username);
- Minz_Session::_param('passwordHash', $s);
- Minz_Session::_param('csrf');
+ Minz_Session::_params([
+ 'currentUser' => $username,
+ 'passwordHash' => $s,
+ 'csrf' => false,
+ ]);
FreshRSS_Auth::giveAccess();
Minz_Translate::init($conf->language);
diff --git a/app/Controllers/errorController.php b/app/Controllers/errorController.php
index b0bafda72..a5f901fd4 100644
--- a/app/Controllers/errorController.php
+++ b/app/Controllers/errorController.php
@@ -16,8 +16,10 @@ class FreshRSS_error_Controller extends Minz_ActionController {
public function indexAction() {
$code_int = Minz_Session::param('error_code', 404);
$error_logs = Minz_Session::param('error_logs', array());
- Minz_Session::_param('error_code');
- Minz_Session::_param('error_logs');
+ Minz_Session::_params([
+ 'error_code' => false,
+ 'error_logs' => false,
+ ]);
switch ($code_int) {
case 200 :
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index 4dfd11751..06c9ebc04 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -350,9 +350,11 @@ class FreshRSS_user_Controller extends Minz_ActionController {
// get started immediately.
if ($ok && !FreshRSS_Auth::hasAccess('admin')) {
$user_conf = get_user_configuration($new_user_name);
- Minz_Session::_param('currentUser', $new_user_name);
- Minz_Session::_param('passwordHash', $user_conf->passwordHash);
- Minz_Session::_param('csrf');
+ Minz_Session::_params([
+ 'currentUser' => $new_user_name,
+ 'passwordHash' => $user_conf->passwordHash,
+ 'csrf' => false,
+ ]);
FreshRSS_Auth::giveAccess();
}