1
我想出如何让杜本seperatlyConcrete5用户属性
显示用户属性:
<?php
//Create a User object (of the current User)
$u = new User();
//Creat a UserInfo object with the user ID
$ui = UserInfo::getByID($u->getUserID());
//Get the Value of your user Attribute
$value = $ui->getAttribute('name');
//Print it out
echo $value;
?>
显示网页所有者:
<?php
$ownerID = $cobj->getCollectionUserID();
$uia = UserInfo::getByID($ownerID);
$ownerName = $uia->getUserName();
echo $ownerName
?>
但我无法弄清楚如何将它们一起显示属性('name');页所有者的
你们可以请帮
感谢
你试过'$ uia->的getAttribute( '名' );'?我不知道Concrete5,但根据你的两个代码示例,这应该做到这一点。 – hakre