R0.23 No Longer Supported

Login & Registration Error

More
16 years 3 months ago #1 by Maxie
Login & Registration Error was created by Maxie
Often (but not everytime) when I complete registration or login I receive this error:

"isAdmin()) return; session_name ("MoodleSession"); session_id(""); session_destroy(); session_unregister("USER"); session_unregister("SESSION"); setcookie('MoodleSession', '', time() - 3600, '/','','',0); unset($_SESSION); } /* Creates Moodle session */ function onLoginUser($user, $options = array()) { global $mainframe; if ($mainframe->isAdmin()) return; $comp_params = &JComponentHelper::getParams( 'com_joomdle' ); $moodle_url = $comp_params->get( 'MOODLE_URL' ); $create_user = $comp_params->get( 'auto_create_users' ); $session =& JFactory::getSession(); $token = md5 ($session->getId()); $username = $user; $app = & JFactory::getApplication(); $app->redirect($moodle_url."/auth/joomdle/land.php?username=$username&token=$token&use_wrapper=0&create_user=$create_user" ); return; } /* Creates Moodle user */ function onAfterStoreUser ($user, $options = array()) { $comp_params = &JComponentHelper::getParams( 'com_joomdle' ); /* Don't create user if not configured to do so */ if (!$comp_params->get( 'auto_create_users' )) return; $username = $user; $request = xmlrpc_encode_request("auth/joomdle/auth.php/create_joomdle_user", array ($username)); $comp_params = &JComponentHelper::getParams( 'com_joomdle' ); $moodle_url = $comp_params->get( 'MOODLE_URL' ); $moodle_xmlrpc_server_url = $moodle_url.'/mnet/xmlrpc/server.php'; $context = stream_context_create(array('http' => array( 'method' => "POST", 'header' => "Content-Type: text/xml ", 'content' => $request ))); $file = file_get_contents($moodle_xmlrpc_server_url, false, $context); $reply = xmlrpc_decode($file); } } ?> "

Any ideas?

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

More
16 years 3 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Login & Registration Error
This is very strange, and even more strange is the fact that it does not happen all the time.

You are getting the code instead of executing it.... no one reported this before.

If you know some PHP and can put some debug maybe we can get to the problem...

Are you on localhost or a hosted site?

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

More
16 years 3 months ago #3 by Chris
Replied by Chris on topic Re: Login & Registration Error
Hi Maxiec

I just received your email. I shall forward this to Antonio as he is far more capable than me at answering this type of question :)

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

More
16 years 3 months ago - 16 years 3 months ago #4 by Maxie
Replied by Maxie on topic Re: Login & Registration Error
Hi fellas,
Thanks for your speedy replies! I am running Joomla and Moodle on a StormOnDemand cloud based server.

I have to thank you both, as I first tried to integrate Joomla and Moodle back in 2006, with no success. Your integration is through and exactly what I desired. It's clear you have put in substantial development work, as well as your great support.

Now if only I can get it to work as well as your demo!

Best regards,
Maxie
Last edit: 16 years 3 months ago by Maxie.

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

More
16 years 3 months ago #5 by Maxie
Replied by Maxie on topic Re:Login & Registration Error
On more question. Do you think that the Alpha Registration component will work with Joomdle? extensions.joomla.org/extensions/access-.../authentication/7727

I like it much better than standard Joomla registration.

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

More
16 years 3 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Re:Login & Registration Error
I don't know, but I guess not, as I guess it will need some special work done.

If you want it, please add a feature request in the forum and we will take a look at it when we can (already a lot of things in the list by now ;)

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

More
16 years 3 months ago #7 by Maxie
Replied by Maxie on topic Re:Login & Registration Error
Still working on this but I noticed a couple of things that it might help to clear up in the documentation.
1. Should XML-RPC - Joomla plugin be enabled?
2. After installing the joomdle module in Moodle, I forgot to click notifications to install the tables.

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