我想向用户配置文件添加更多字段,例如图像 URL。我希望它像这样工作:
$user = JFactory::getUser();
echo "Your name is {$user->name}, your email is {$user->email}, and your username is
{$user->username}";
换句话说,我希望能够做到这一点:
$profilepicture = $user->image;
这可能吗?它是如何完成的?
You can make your own user plugin by cloning the current one and adding whatever fields you need to the xml. Or you can just add another xml form to the current one but you'd have to modify the core to tell it when to use the fields. Or just change one of the fields in the current form to a media field.