After staff login can their name be viewed for their login

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
TechGuy29
Posts: 6
Joined: Fri Aug 05, 2016 6:01 pm

After staff login can their name be viewed for their login

Post by TechGuy29 »

Script URL: local
Version of script: 2.6.8
Hosting company: local
URL of phpinfo.php: local
URL of session_test.php: local
What terms did you try when SEARCHING for a solution: Did a search for any related topic, relating to my HESK question...

Write your message below:
Firstly let me say great work here Klemen, well done.
Still working my way through things, reading, researching etc...
Anyway, my question is, after a staff member logs in. There name does not displayed. Can i see this feature in future updates, or with your help can i attempt inserting the code myself? :)
Klemen
Site Admin
Posts: 10163
Joined: Fri Feb 11, 2005 4:04 pm

Re: After staff login can their name be viewed for their login

Post by Klemen »

Where exactly do you want the name to be shown?

If you are familiar with PHP/HTML, the variable that holds the current user's name is $_SESSION['name']
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
alcazar
Posts: 81
Joined: Mon May 27, 2013 6:36 pm

Re: After staff login can their name be viewed for their login

Post by alcazar »

Isnt this already possible with option "Show online users (x min)" and permission to see online users?
Thanks.
Alcazar
(nach Diktat spazierengegangen)
TechGuy29
Posts: 6
Joined: Fri Aug 05, 2016 6:01 pm

Re: After staff login can their name be viewed for their login

Post by TechGuy29 »

It would be nice to see the user which just logged on far right inside or above the green banner.

Just started learning PHP, i know a little HTML... :roll:

@ Alcazar:
That is not quite what i would like staff users to have, that refers to amount of online staff users at a given time i think...
If i click the "?" it says the following
"Online Users

If checked HESK will show a list of users online in the last X minutes at the bottom of the help desk (in staff interface only)."

So that is not quite what i mean Alcazar... :)

Thanks for pointing that out though, i will however enable the feature... :D
Treblig
Posts: 10
Joined: Wed Jan 28, 2015 5:59 pm

Re: After staff login can their name be viewed for their login

Post by Treblig »

My header.php (might be header.txt in original HESK but I changed many things) goes something like this :

Code: Select all

<?php
echo '
	<div style="width: 60%; margin-left: auto; margin-right: auto;">
		<a href="' . HESK_PATH . 'login.php">
		<img src="' . HESK_PATH . 'img/logo.png" width="204" height="43" alt="logo" /></a>

		<a href="'. HESK_PATH . 'logout.php">
		<img style="float:right;" src="' .  HESK_PATH . 'img/logoff.png" width="43" height="43" alt="' . $hesklang['logout'] . '" /></a>

		<a href="'. HESK_PATH . 'knowledgebase.php">
		<img style="float:right;" src="' .  HESK_PATH . 'img/logo_faq.png" width="43" height="43" alt="' . $hesklang['kb_text'] . '" /></a>';

		if(isset($_COOKIE['hesk_admin'])) {
			if ($_COOKIE['hesk_admin'] == '1') echo '<a href="' . HESK_PATH . 'admin/">';}
		if (isset($_COOKIE['hesk_username'])) {
			echo '<span style="font-weight: bold; height: 43px; color: blue; line-height: 43px; text-align: center; float: right;">';
				echo 'Hello ' . $_COOKIE['hesk_username'];
			echo '</span>';
		}
		if(isset($_COOKIE['hesk_admin'])) {
			if ($_COOKIE['hesk_admin'] == '1') echo '</a>';}
echo '
	</div>
	<div style="clear:both"></div>
	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>';
This gives me the login id (among other things) in the right hand corner of the header.
Can't say it will work for you as is since I made many changes to HESK, in particular a mandatory login for all users so I may have set some cookies that didn't exist before.
Post Reply