Ajax register Can't get data.

11 years 8 months ago #6916 by Carlos
Hi !

I've been working with the Ajax registration, I need to get all the extra fields to send them in the confirmation e-mail.

I tried with this:

$user = JFactory::getUser();
$variable=$user->extra;

It always returns an empty variable on both cases. I'm working on the models/registration.php and trying to send it on COM_USERS_EMAIL_ACTIVATE_WITH_ADMIN_ACTIVATION_BODY.

What can I do, thank you for the help ! :D

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

11 years 8 months ago #6917 by Saka

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

11 years 8 months ago #6919 by Carlos
Yes that is the guide I've trying to use but with no success.

What is 'postalcode' in this case? is this the label name? is this the database field? what name should I use?

Thank you.

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

11 years 8 months ago #6920 by Saka
Do the
$user = JFactory::getUser();
print_r($user->extra);
and you will see the keys and the values. You will use the key.

Emir Sakic
www.sakic.net

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

11 years 8 months ago #6943 by Carlos
Hi ! I've trying and checking, and theres is not the ->extra field attached to the user object.

I have joomla 3.0 and the last version of the plug in, what errors could I have ?

This is the result.

JUser Object ( [isRoot:praotected] => [id] => 508 [name] => Diego Mejia [username] => This email address is being protected from spambots. You need JavaScript enabled to view it. => diego@mdxx.biz [password] => c39381d044afb269795c1c0b1ab1ca77:fMJpyNJekoDjQgt0defvRYSGvoAAjZCO [password_clear] => [usertype] => [block] => 0 [sendEmail] => 0 [registerDate] => 2013-03-18 23:23:35 [lastvisitDate] => 0000-00-00 00:00:00 [activation] => [params] => {"activate":1} [groups] => Array ( [2] => 2 ) [guest] => [lastResetTime] => 0000-00-00 00:00:00 [resetCount] => 0 [_params:protected] => JRegistry Object ( [data:protected] => stdClass Object ( [activate] => 1 ) ) [_authGroups:protected] => [_authLevels:protected] => [_authActions:protected] => [_errorMsg:protected] => [_errors:protected] => Array ( ) ) As you can see, there is not extra anywhere.[email] => This email address is being protected from spambots. You need JavaScript enabled to view it. [password] => c39381d044afb269795c1c0b1ab1ca77:fMJpyNJekoDjQgt0defvRYSGvoAAjZCO [password_clear] => [usertype] => [block] => 0 [sendEmail] => 0 [registerDate] => 2013-03-18 23:23:35 [lastvisitDate] => 0000-00-00 00:00:00 [activation] => [params] => {"activate":1} [groups] => Array ( [2] => 2 ) [guest] => [lastResetTime] => 0000-00-00 00:00:00 [resetCount] => 0 [_params:protected] => JRegistry Object ( [data:protected] => stdClass Object ( [activate] => 1 ) ) [_authGroups:protected] => [_authLevels:protected] => [_authActions:protected] => [_errorMsg:protected] => [_errors:protected] => Array ( ) )

As you can see, there is not extra anywhere.

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

11 years 8 months ago #6944 by Carlos
My mistake I'm using joomla 2.5

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

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch