Joomla! -如何为用户注册添加其他信息? [英] Joomla! - How to add extra information for user registration?
本文介绍了Joomla! -如何为用户注册添加其他信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为我的网站运行Joomla 2.5.1.
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..
我可以知道怎么做吗?
推荐答案
问题是如何访问此配置文件数据.
the problem is how to access to this profile data. this
JFactory::getUser()->get('address1','');
似乎没有用.
但这可以完成工作:
jimport('joomla.user.helper');
$user = & JFactory::getUser();
$profile = JUserHelper::getProfile($user->id);
echo $profile->profile['address1'];
这篇关于Joomla! -如何为用户注册添加其他信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文