【发布时间】:2010-09-24 14:46:27
【问题描述】:
我们使用的是 dotCMS 1.7a,我在获取管理员角色用户的电子邮件地址时遇到了困难。
此 SQL 有效:
select user_.emailaddress
from user_
INNER JOIN users_roles
ON users_roles.userid = user_.userid
INNER JOIN role_
ON users_roles.roleid = role_.roleid
where role_.name = 'Administrator';
但是这个 Velocity 代码没有:
<p>Start</p>
#set($found = $cmsuser.searchUsersAndUsersProxy(null, null, null, [], true,
["Administrator"], true, null, 1, 0))
<p>Finish</p>
<p>Found: $found [$found.size()].</p>
#set($theUsers = $found.get("users"))
<p>Got theUsers: $theUsers [$theUsers.size()].</p>
以上代码的输出为:
Start
Finish
Found: {total=22, usersProxy=[], users=[], groupNames=[], roleNames=[]} [5].
Got theUsers: [] [0].
出了什么问题?任何帮助将不胜感激!
罗伯 :)
【问题讨论】: