aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/userController.php3
-rw-r--r--app/Models/EntryDAOSQLite.php2
2 files changed, 3 insertions, 2 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index 4a04737f2..d5c90a382 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -94,14 +94,15 @@ class FreshRSS_user_Controller extends Minz_ActionController {
Minz_View::prependTitle(_t('users.manage') . ' ยท ');
+ // Get the correct current user.
$userDAO = new FreshRSS_UserDAO();
-
$username = Minz_Request::param('u', Minz_Session::param('currentUser'));
if (!$userDAO->exist($username)) {
$username = Minz_Session::param('currentUser');
}
$this->view->current_user = $username;
+ // Get information about the current user.
$entryDAO = FreshRSS_Factory::createEntryDao($this->view->current_user);
$this->view->nb_articles = $entryDAO->count();
$this->view->size_user = $entryDAO->size();
diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php
index 66078aca9..4a3fe24a2 100644
--- a/app/Models/EntryDAOSQLite.php
+++ b/app/Models/EntryDAOSQLite.php
@@ -124,6 +124,6 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO {
}
public function size($all = false) {
- return @filesize(DATA_PATH . '/' . Minz_Session::param('currentUser', '_') . '.sqlite');
+ return @filesize(DATA_PATH . '/' . $this->current_user . '.sqlite');
}
}