[bug 907933] Do not query twice for public profile IDs.
Merge pull request #1109 from akatsoulas/907933-elastic

[bug 907933] Do not query twice for public profile IDs.