I'm current working on a webpart which uses the search engine to get all crawled tasks and return the ones assigned to the currently logged in user.
I'm using the field
AssignedTo where I give the search string the
SPWeb.CurrentUser.Name as the value parameter, but there are cases where users'
Name property are identical (people sometimes have the same name, who would have thought) and the webpart returns results that are not ment for some users.
My search string looks like this so far:
ContentClass:"STS_ListItem_Tasks" AND AssignedTo:"<Current user name>" NOT Status:"Complete"
Is there are more explicit way of searching for tasks assigned to the currently logged in user without using their name but perhaps their ID or SSID or some completely third property that is a unique identifier?