| |
1 |
1 |
<?xml version="1.0"?> |
| |
2 |
2 |
<queryset> |
| |
3 |
3 |
|
| |
4 |
4 |
<fullquery name="user_info"> |
| |
5 |
5 |
<querytext> |
| |
6 |
6 |
select first_names, last_name, email, |
| |
7 |
7 |
coalesce(screen_name,'< none set up >') as screen_name, |
| |
8 |
8 |
creation_date, creation_ip, last_visit, member_state, |
| |
9 |
9 |
email_verified_p, url |
| |
10 |
10 |
from cc_users |
| |
11 |
11 |
where user_id = :user_id |
| |
12 |
12 |
</querytext> |
| |
13 |
13 |
</fullquery> |
| |
14 |
14 |
|
| |
15 |
15 |
<fullquery name="user_is_admin"> |
| |
16 |
16 |
<querytext> |
| |
17 |
17 |
select privilege |
| |
18 |
18 |
from acs_permissions |
| |
19 |
|
where object_id = 0 |
| |
|
19 |
where object_id = :sec_context_root |
| |
20 |
20 |
and grantee_id = :user_id |
| |
21 |
21 |
and privilege = 'admin' |
| |
22 |
22 |
</querytext> |
| |
23 |
23 |
</fullquery> |
| |
24 |
24 |
|
| |
25 |
25 |
<fullquery name="get_item_id"> |
| |
26 |
26 |
<querytext> |
| |
27 |
27 |
select live_revision as revision_id, |
| |
28 |
28 |
coalesce(title,'view this portrait') as portrait_title |
| |
29 |
29 |
from acs_rels a, cr_items c, cr_revisions cr |
| |
30 |
30 |
where a.object_id_two = c.item_id |
| |
31 |
31 |
and c.live_revision = cr.revision_id |
| |
32 |
32 |
and a.object_id_one = :user_id |
| |
33 |
33 |
and a.rel_type = 'user_portrait_rel' |
| |
34 |
34 |
</querytext> |
| |
35 |
35 |
</fullquery> |
| |
36 |
36 |
|
| |
37 |
37 |
<fullquery name="all_group_membership"> |
| |
38 |
38 |
<querytext> |
| |
39 |
39 |
select distinct lower(groups.group_name) as group_name |