diff options
| author | 2014-10-16 17:08:48 +0200 | |
|---|---|---|
| committer | 2014-10-17 16:24:21 +0200 | |
| commit | d4ad951b9b686f387056bda8f3fa6ede8d9ca3f1 (patch) | |
| tree | 1079163173ae8b0870d13386e605e9ef51ac72b1 /app/Controllers/userController.php | |
| parent | 2796cc9ae559842a90fa15cba65c94a11b29195e (diff) | |
Show more information about user when selected
Diffstat (limited to 'app/Controllers/userController.php')
| -rw-r--r-- | app/Controllers/userController.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php index 00b51cc3d..4a04737f2 100644 --- a/app/Controllers/userController.php +++ b/app/Controllers/userController.php @@ -87,11 +87,24 @@ class FreshRSS_user_Controller extends Minz_ActionController { * This action displays the user management page. */ public function manageAction() { + if (!FreshRSS_Auth::hasAccess('admin')) { + Minz_Error::error(403, + array('error' => array(_t('access_denied')))); + } + Minz_View::prependTitle(_t('users.manage') . ' ยท '); - $this->view->current_user = Minz_Request::param( - 'u', Minz_Session::param('currentUser', '_') - ); + $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; + + $entryDAO = FreshRSS_Factory::createEntryDao($this->view->current_user); + $this->view->nb_articles = $entryDAO->count(); + $this->view->size_user = $entryDAO->size(); } public function createAction() { |
