Enonic version: 7.2
OS: Mac OS Catalina
When using auth.findUsers (authentication library) and wanting to use/search for a certain ‘key’ in query, then I end up with 0 results. On the other hand, using ‘_id’ does work.
This does not work
const author = findUsers({
count: 1,
query: key = '${creator}'
});
This does work
const author = findUsers({
count: 1,
query: _id = '${creator}'
});
The issue here is that the structure for each result does not contain ‘_id’ but ‘key’ (following example taken from xp documentation):
type: “user”,
key: “user:system:jorgen-juve”,
displayName: “Jørgen Juve”,
disabled: false,
email: "[email protected]",
login: “jorgen-juve”,
idProvider: “system”
Best regards,
BetaKeks