Change dashboard
This commit is contained in:
@@ -31,27 +31,6 @@ class User extends Base
|
||||
return $this->template->layout('user/layout', $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Common method to get the user
|
||||
*
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
protected function getUser()
|
||||
{
|
||||
$user = $this->user->getById($this->request->getIntegerParam('user_id'));
|
||||
|
||||
if (empty($user)) {
|
||||
$this->notfound();
|
||||
}
|
||||
|
||||
if (! $this->userSession->isAdmin() && $this->userSession->getId() != $user['id']) {
|
||||
$this->forbidden();
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* List all users
|
||||
*
|
||||
@@ -138,20 +117,6 @@ class User extends Base
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display user calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function calendar()
|
||||
{
|
||||
$user = $this->getUser();
|
||||
|
||||
$this->response->html($this->layout('user/calendar', array(
|
||||
'user' => $user,
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Display timesheet
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user