summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-08 19:30:37 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commitd15946df2dfb0ae2f0ca9371e5c8071df91ab45a (patch)
tree49601aafd74da5a781920543ed92bbd180fe5e89 /includes
parent8e62c4c52c27f9432820915deeb699c3d1f58ce7 (diff)
Changed `src/` code and templates to use the new user model
Diffstat (limited to 'includes')
-rw-r--r--includes/helper/email_helper.php2
-rw-r--r--includes/view/User_view.php9
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 '';
}