Logout not redirecting correctly

More
13 years 7 months ago - 13 years 7 months ago #1 by AVENA
Logout not redirecting correctly was created by AVENA
Hello! First of all, thank you for this wonderful extension/plugin! It has worked wonders for what we're trying to accomplish!

I've gotten the entire thing set up, but for some reason when a user is logged into the Joomla! frontend and goes to log out this error appears:

Deprecated: Function session_unregister() is deprecated in /home/avena/public_html/WildBrilliancePress/WB_Moodle/auth/joomdle/land_logout.php on line 25

Deprecated: Function session_unregister() is deprecated in /home/avena/public_html/WildBrilliancePress/WB_Moodle/auth/joomdle/land_logout.php on line 26

Warning: Cannot modify header information - headers already sent by (output started at /home/avena/public_html/WildBrilliancePress/WB_Moodle/auth/joomdle/land_logout.php:25) in /home/avena/public_html/WildBrilliancePress/WB_Moodle/auth/joomdle/land_logout.php on line 28

Skip to main content<- This is hidden until "skip" is searched for in the browser's "find" function

This page should automatically redirect. If nothing is happening please use the continue link below.
(Continue)
Error output, so disabling automatic redirect.


And, of course, no redirection occurs. Clicking the "Continue" link does go to the main page. I've checked and the auth_joomdle package is installed, and I have all green checks in the System Check.

Does anyone have any idea how to remedy this? Thank you!

EDIT: I thought I'd also mention what I'm running -

Joomdle 0.82
Joomla! 2.5.7
Moodle 2.3.1
PHP Version 5.3.15
Last edit: 13 years 7 months ago by AVENA.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago - 13 years 7 months ago #2 by AVENA
Replied by AVENA on topic Logout not redirecting correctly
I fixed it!

Replace this code in land_logout.php on lines 25 and 26:
Code:
session_unregister("USER"); session_unregister("SESSION");

with this code:
Code:
unset($_SESSION['USER']); unset($_SESSION['SESSION']);

It works for me, as far as I can tell (although I have no knowledge of php.) If this is wrong or creates another problem I'm not yet aware of, please let me know.

I hope this will help someone else with the same problem!

EDIT:

OR... you can just delete this entire block of code!
Code:
session_unregister("USER"); session_unregister("SESSION");
Last edit: 13 years 7 months ago by AVENA.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #3 by Antonio Durán
Replied by Antonio Durán on topic Logout not redirecting correctly
Thanks for sharing your solution.
This is already fixed for next release, removing it altoguether like you say.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #4 by Anthony Chung
Replied by Anthony Chung on topic Logout not redirecting correctly
we've encountered this error today too.

Wonder when the new release will come out?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #5 by Chris
Replied by Chris on topic Logout not redirecting correctly
You can manually edit the files as above. At this time, I do not have a date for the next release.

Please Log in or Create an account to join the conversation.