diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-10-08 19:30:37 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-10-31 13:43:23 +0100 |
commit | d15946df2dfb0ae2f0ca9371e5c8071df91ab45a (patch) | |
tree | 49601aafd74da5a781920543ed92bbd180fe5e89 /includes | |
parent | 8e62c4c52c27f9432820915deeb699c3d1f58ce7 (diff) |
Changed `src/` code and templates to use the new user model
Diffstat (limited to 'includes')
-rw-r--r-- | includes/helper/email_helper.php | 2 | ||||
-rw-r--r-- | includes/view/User_view.php | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php index e9e5a323..7cd60933 100644 --- a/includes/helper/email_helper.php +++ b/includes/helper/email_helper.php @@ -28,7 +28,7 @@ function engelsystem_email_to_user($recipient_user, $title, $message, $not_if_it $recipient_user['email'], $title, 'emails/mail', - ['user' => $recipient_user['Nick'], 'message' => $message] + ['username' => $recipient_user['Nick'], 'message' => $message] ); $translator->setLocale($locale); diff --git a/includes/view/User_view.php b/includes/view/User_view.php index f8160765..1b3c0daf 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -1,6 +1,7 @@ <?php use Carbon\Carbon; +use Engelsystem\Models\User\User; /** * Renders user settings page @@ -279,6 +280,14 @@ function Users_table_header_link($column, $label, $order_by) */ function User_shift_state_render($user) { + if ($user instanceof User) { + $userModel = $user; + $user = [ + 'Gekommen' => $userModel->state->arrived, + 'UID' => $user->id, + ]; + } + if (!$user['Gekommen']) { return ''; } |