summaryrefslogtreecommitdiff
path: root/includes/controller/user_worklog_controller.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-17 01:30:10 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commita2aaba9cab6b7bdf755a023ed2503cf8cf46925a (patch)
tree04275448599cc8ffaf908b3d7fcc984d822f6a17 /includes/controller/user_worklog_controller.php
parentd7aea575ff77cd37c326511e7ac5fe49067c63ad (diff)
User: Bugfixes & code cleanup
Diffstat (limited to 'includes/controller/user_worklog_controller.php')
-rw-r--r--includes/controller/user_worklog_controller.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/includes/controller/user_worklog_controller.php b/includes/controller/user_worklog_controller.php
index 51b70ba2..333fd76e 100644
--- a/includes/controller/user_worklog_controller.php
+++ b/includes/controller/user_worklog_controller.php
@@ -9,12 +9,10 @@ use Engelsystem\Models\User\User;
*/
function user_worklog_delete_controller()
{
- $user = auth()->user();
-
$request = request();
$userWorkLog = UserWorkLog($request->input('user_worklog_id'));
if (empty($userWorkLog)) {
- redirect(user_link($user->id));
+ redirect(user_link(auth()->user()->id));
}
$user_source = User::find($userWorkLog['user_id']);
@@ -38,12 +36,10 @@ function user_worklog_delete_controller()
*/
function user_worklog_edit_controller()
{
- $user = auth()->user();
-
$request = request();
$userWorkLog = UserWorkLog($request->input('user_worklog_id'));
if (empty($userWorkLog)) {
- redirect(user_link($user->id));
+ redirect(user_link(auth()->user()->id));
}
$user_source = User::find($userWorkLog['user_id']);
@@ -110,12 +106,10 @@ function user_worklog_from_request($userWorkLog)
*/
function user_worklog_add_controller()
{
- $user = auth()->user();
-
$request = request();
$user_source = User::find($request->input('user_id'));
if (!$user_source) {
- redirect(user_link($user->id));
+ redirect(user_link(auth()->user()->id));
}
$userWorkLog = UserWorkLog_new($user_source->id);