X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=charts.php;h=862a2fad61b3be312ff0a0c7df539d3540d894bb;hb=HEAD;hp=6329e14f8d287d4f114016330bcbec4bd0356880;hpb=03e3d32869aa0791e1d841be69cf5c0c84a5450f;p=timetracker.git diff --git a/charts.php b/charts.php index 6329e14f..862a2fad 100644 --- a/charts.php +++ b/charts.php @@ -46,6 +46,10 @@ if (!$user->isPluginEnabled('ch')) { header('Location: feature_disabled.php'); exit(); } +if (!$user->exists()) { + header('Location: access_denied.php'); // Nobody to display a chart for. + exit(); +} if ($user->behalf_id && (!$user->can('view_charts') || !$user->checkBehalfId())) { header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. exit(); @@ -69,9 +73,6 @@ if ($request->isPost() && $userChanged) { $user->setOnBehalfUser($user_id); } else { $user_id = $user->getUser(); - // Handle a situation for no users in on behalf group. - if ($user->behalfGroup && $user_id == $user->id) - $user_id = null; } $uc = new ttUserConfig();