problem with login

  • Damián
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 9 months ago - 14 years 9 months ago #1 by Damián
problem with login was created by Damián
Hola Antonio, Hi Antonio

I'm going to write in my poor english, i hope you have no problem to understand me.

I have a joomla 1.5.23 and a 1.9.11 moodle, joomla 0.51, i have no problem with the integration, but today i have register a user with moodle form, and when i press "submit" this error appear.

Notice: Undefined index: newpassword in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2713 Notice: Undefined variable: CFG in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Trying to get property of non-object in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Undefined variable: CFG in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Trying to get property of non-object in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Undefined variable: id in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2749
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

SELECT f.id, d.data FROM user_info_field as f, user_info_data d WHERE f.id=d.fieldid and userid =

line 686 of lib/dmllib.php: call to debugging()
line 966 of lib/dmllib.php: call to get_recordset_sql()
line 2751 of auth/joomdle/auth.php: call to get_records_sql()
line ? of unknownfile: call to joomdle_user_created()
line 253 of lib/eventslib.php: call to call_user_func()
line 425 of lib/eventslib.php: call to events_dispatch()
line 78 of auth/joomdle/auth.php: call to events_trigger()
line 42 of login/signup.php: call to auth_plugin_joomdle->user_signup()

Warning: Invalid argument supplied for foreach() in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2755

Thx in advance, if you need more information tell me.

Muchas gracias Antonio, el trabajo que haces es brutal. Un saludo
Last edit: 14 years 9 months ago by Damián.

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

  • Damián
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 8 months ago #2 by Damián
Replied by Damián on topic Re: problem with login
Buenas a todo el equipo de Joomdle,

supongo que no me expliqué bien en inglés, así que voy a hacerlo en español a ver si me podéis ayudar con el problema que tengo.

Ya he utilizado otras veces joomdle con joomla sin problemas, quiero daros la enhorabuena por el trabajo tan excelente que hacéis para la comunidad.

Ahora bien la última vez que he trabajado con el se me ha presentado un problema, os digo lo que estoy utilizando:

- Joomla 1.5.23
- Joomdle 0.51

En principio no parece haber problema con la integración, el test de joomla me lo da todo correcto, tengo configurado como en otras ocasiones tanto joomla como moodle, y joomdle.

El problema viene al registrar usuarios, cuando entro el formulario de registro y le doi a registrar me sale el siguiente error.


Notice: Undefined index: newpassword in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2713 Notice: Undefined variable: CFG in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Trying to get property of non-object in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Undefined variable: CFG in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Trying to get property of non-object in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2748 Notice: Undefined variable: id in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2749
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

SELECT f.id, d.data FROM user_info_field as f, user_info_data d WHERE f.id=d.fieldid and userid =

line 686 of lib/dmllib.php: call to debugging()
line 966 of lib/dmllib.php: call to get_recordset_sql()
line 2751 of auth/joomdle/auth.php: call to get_records_sql()
line ? of unknownfile: call to joomdle_user_created()
line 253 of lib/eventslib.php: call to call_user_func()
line 425 of lib/eventslib.php: call to events_dispatch()
line 78 of auth/joomdle/auth.php: call to events_trigger()
line 42 of login/signup.php: call to auth_plugin_joomdle->user_signup()

Warning: Invalid argument supplied for foreach() in /home/www/vhosts/xxxxxxx/httpdocs/formacion/auth/joomdle/auth.php on line 2755

¿Alguna idea, de qué puede ocurrir? o por dónde pueden ir los tiros?

Os agradecería cualquier ayuda, me tiene preocupado esto.

Un saludo, y gracias por adelantado

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

More
14 years 8 months ago #3 by Antonio Durán
Replied by Antonio Durán on topic Re: problem with login
Hola.

Siento que tu primer post se quedara sin contestar. No es por el idioma, sino que seguro que se nos pasó en el momento por lo que sea, y así se quedó.

He mirado el código, y veo que hay algunos pequeños fallos que hacen que veas esos mensajes.

Si quieres probar a hacer los cambios, solo tienes que añadir un par de cosas en moodle/auth/joomdle/auth.php, en la funcion joomdle_user_created.
Cambia:
$password_clear = ($_POST);
Por:
if (array_key_exists ('newpassword', $_POST))
$password_clear = ($_POST);
else $password_clear = '';


Añade:
$id = $user->id;
Depués de:
$userinfo = $user->picture;



Estos errores no te hacían nada malo porque solo afectan cuanto tienes campos de perfil adicionales de Moodle.

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

More
14 years 8 months ago #4 by Antonio Durán
Replied by Antonio Durán on topic Re: problem with login
Ay, se me olvidaba otro cambio:
Añadir en la primera linea de la funcion:
global $CFG;

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

  • Damián
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 8 months ago #5 by Damián
Replied by Damián on topic Re: problem with login
Muchísimas gracias Antonio, pruebo y te cuento, por si le ha pasado a alguien más.

Un saludo!

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

  • Damián
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 6 months ago #6 by Damián
Replied by Damián on topic Re: problem with login
Hola Antonio,

hice los cambios que me comentaste y en principio no se me ha resuelto el problema. ¿Podrías ayudarme, se te ocurre algo más? Si necesitas el archivo para ver si está bien el código o cualquier cosa, dímelo y te lo envío por privado al mail que me digas.

Un saludo

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

More
14 years 6 months ago #7 by Chris
Replied by Chris on topic Re: problem with login
Hi there

Antonio is on leave this week. I shall pass your note along to him next week.

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

  • Damián
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 6 months ago #8 by Damián
Replied by Damián on topic Re: problem with login
Thx for your attention Chris :)

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

More
14 years 6 months ago #9 by Antonio Durán
Replied by Antonio Durán on topic Re: problem with login
Hola.

Apliqué los cambios que te comenté en la última versión de Joomdle (R0.6) así que si puedes actualizar y comprobar si aún te queda algún error, sería lo más fácil.

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