问题
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?
回答1:
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'];
回答2:
I hope you have solved your problem, but this link will show you how to add more fields:
http://docs.joomla.org/Creating_a_profile_plugin
回答3:
In joomla 2.5 You can add extra 12 fields to the user registration. The step for adding the extra field is Go to the Plug-In Manager (Extensions > Plug-In Manager) and look for a plugin named as User - Profile. This plugin comes with Joomla by default, so you don't need to install anything. However, plugin is disabled by default, so you must enable it first. This single click is enough to change Joomla registration form dramatically and add 12 useful fields:
回答4:
Joomla 2.5.x has User - Profile plugin with 12 fields, if you need further fields try this:
http://extensions.joomla.org/extensions/access-a-security/site-access/authentication/14303
回答5:
there is two relative fields in joomla 2.5.1 register page.
for view section:
Joomla_2.5.1/components/com_users/views/registration/tmpl/default.php
which will possible get data from its relevant file that is:
Joomla_2.5.1/components/com_users/controllers/registration.php
Joomla_2.5.1/components/com_users/models/forms/registration.xml
Joomla_2.5.1/components/com_users/models/registration.php
try to modify these files
回答6:
The easiest way is to use the extension Community Builder. It is one of the most popular Joomla! extensions, and it has a lot of capabilities. Allowing you as site administrator to define extra fields for the user profile is just the start of it.
CB, as it is called, has a plugin architecture. Both the CB developers and others have developed plugins that let you extend what CB can do for you. Connections to Facebook and Twitter, paid subscriptions, rating other users — there are many possibilities.
CB is free software, GPL licensed. However, you pay for access to the documentation and for support. Also, some of the plugins are proprietary software.
Update: The current version of CB is 1.7.1, and it supports Joomla! 1.0 through 1.7, but not Joomla 2.5.x. However, as of February 7, 2012, Community Builder 1.8 is in RC. It supports and has been tested with all Joomla! versions through 2.5.1. RC stands for "Release Candidate", so it's not yet ready to use on production sites — though the developers say it powers their own joomlapolis.com site. "The goal is to release CB 1.8 stable version before Joomla 1.7 end of life date", developers say.
来源:https://stackoverflow.com/questions/9206168/joomla-how-to-add-extra-information-for-user-registration