Logout function

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
perfh
Posts: 4
Joined: Sat Jan 02, 2010 11:54 pm

Logout function

Post by perfh »

Hello :) !

I'm actually doing an integration of Hesk in a script that I'm developing myself.

Login and password will be the same on my script and on Hesk.

I create the necessary cookies with the following code :

Code: Select all

setcookie('hesk_username', "$user", strtotime('+1 year'));
setcookie('hesk_p', "$pass_enc", strtotime('+1 year'));
Login works properly, but I don't seem to get disconnection to work. I've looked at Hesk's source code and try those methods :

Code: Select all

<?php		

setcookie('hesk_p', "");
		
?>

Code: Select all

<?php		

setcookie('hesk_username', "");
setcookie('hesk_p', "");
		
?>

Code: Select all

<?php

setcookie('hesk_username', "", time() - 3600);
setcookie('hesk_p', "", time() - 3600);

?>
None of them work, when I go to the page hesk/admin/admin_main.php I'm still logged in :(

Did you have an idea ? Thank you in advance !
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Logout function

Post by Klemen »

You will also need to destroy HESK session.

See the logout() function inside "admin/index.php" of all the steps Hesk does to logout staff.
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
perfh
Posts: 4
Joined: Sat Jan 02, 2010 11:54 pm

Re: Logout function

Post by perfh »

Thanks for your reply !

My problem is now solved :)
Post Reply