diff options
author | Philip Häusler <msquare@notrademark.de> | 2012-12-30 17:58:23 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2012-12-30 17:58:23 +0100 |
commit | dd4530d760b02693425d39ae579dff514c3e40b4 (patch) | |
tree | 4713de373d2d147a4a9ee4b0658d5ef3dc42db28 /includes/sys_user.php | |
parent | b26994f518b7f7edea6f2236746d084b3bc12e1e (diff) |
User Nick function, enhanced log with some links
Diffstat (limited to 'includes/sys_user.php')
-rw-r--r-- | includes/sys_user.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/sys_user.php b/includes/sys_user.php index 88002706..231b2b62 100644 --- a/includes/sys_user.php +++ b/includes/sys_user.php @@ -1,5 +1,13 @@ <?php +function User_Nick_render($user_source) { + global $user, $privileges; + if($user['UID'] == $user_source['UID'] || in_array('user_shifts_admin', $privileges)) + return '<a href="' . page_link_to('user_myshifts') . '&id=' . $user_source['UID'] . '">' . htmlspecialchars($user_source['Nick']) . '</a>'; + else + return htmlspecialchars($user_source['Nick']); +} + /** * Available T-Shirt sizes |