Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla! - How to add extra information for user registration?

I'm running Joomla 2.5.1 for my website.

For the user registration, there's only Name, Username, Password, Confirm Password, Email Address, and Confirm Email Address.

I'm able to go to 'user-profile' and enable fields such as Address, Country, etc..
However, i want to add additional information such as Company Name, etc..

May i know how can this be done?

like image 769
Lloydworth Avatar asked Dec 12 '22 05:12

Lloydworth


1 Answers

the problem is how to access to this profile data. this

JFactory::getUser()->get('address1','');

doesn't seem to work.

but this does the job:

jimport('joomla.user.helper');
$user = & JFactory::getUser();
$profile = JUserHelper::getProfile($user->id);
echo $profile->profile['address1'];
like image 172
tomek Avatar answered Dec 28 '22 09:12

tomek