[CST-5307] Search claimable profiles by email

This commit is contained in:
Luca Giamminonni
2022-05-19 13:41:54 +02:00
parent 98d75798a4
commit de2202799d

View File

@@ -70,10 +70,8 @@ export class ProfileClaimService {
* @param eperson The eperson to use for the lookup * @param eperson The eperson to use for the lookup
*/ */
private personQueryData(eperson: EPerson): string { private personQueryData(eperson: EPerson): string {
if (eperson) { if (eperson && eperson.email) {
const firstname = eperson.firstMetadataValue('eperson.firstname'); return 'person.email:' + eperson.email;
const lastname = eperson.firstMetadataValue('eperson.lastname');
return '(dc.title:' + eperson.name + ') OR (person.familyName:' + lastname + ' AND person.givenName:' + firstname + ')';
} else { } else {
return null; return null;
} }