CQL function
currentUser() in CQL: syntax and examples (Confluence)
currentUser() stands for whoever runs the search. It lets one saved query mean "my pages" for every person who uses it. You pair it with a user field such as creator, contributor, watcher or favourite.
Syntax
f
i
e
l
d
=
c
u
r
r
e
n
t
U
s
e
r
(
)
Works with
- Fields: creator, contributor, mention, watcher, favourite (the five in the documentation). creator, contributor, watcher, favourite, mention, owner and lastmodifier all ran in our checks.
- Operators: = and != (documented). IN and NOT IN also ran, although the documentation says no.
- Not with: ~ and !~ on user fields. The function must be called with parentheses and needs a logged-in user.
Examples
creator = currentUser() AND type = page AND space = SD ORDER BY lastmodified DESCList the pages you created in one space, most recently changed first. Good for finding your own old drafts.
Run on Confluence Cloud on .
contributor = currentUser() AND lastmodified >= now("-1w") AND type = pagePages you edited or created in the last week. Useful before a weekly status update.
Run on Confluence Cloud on .
mention = currentUser() and creator != currentUser()Content that mentions you but was written by someone else. This is a quick way to see what people expect from you.
Run on Confluence Cloud on .
creator != currentUser() AND type = page AND space = SD AND lastmodified >= now("-1w")Pages in a space that changed this week and were started by other people.
Run on Confluence Cloud on .
watcher = currentUser()Everything you are watching. Handy when you want to clean up notifications.
Run on Confluence Cloud on .
favourite = currentUser()Pages and spaces you starred. Only your own favourites can be searched.
Run on Confluence Cloud on .
Pitfalls
- The name is case sensitive.
creator = currentuser()fails with "Unable to find query function 'currentuser()'". - Leaving out the parentheses does not raise an error.
creator = currentUserruns and finds nothing, because the word is treated as a plain value. - Non-user fields do not complain.
space = currentUser()andtitle = currentUser()run and match nothing. A user field with the wrong operator does fail:creator ~ currentUser()gives "Operator '~' is not supported for field 'creator'. Supported operators are : =, !=, IN, NOT IN". - The documentation lists IN and NOT IN as unsupported for this function, but
creator IN (currentUser())andcreator NOT IN (currentUser())both run (checked on Confluence Cloud, November 2026).
Questions and answers
Can I search another person's pages with currentUser()?
No. It always means the account that runs the query.