Skip to content

"after commit" user trigger search expression wrong #73

Description

@drn05r

The trigger to find eprint records that need updated when a user connects/disconnects is wrong as it will match parts of the creators ID (e.g. email address) and not the whole ID. This is a big problem if email addresses are used as creators ID as many may be for the same domain, so any eprint with a creators ID wthe an email address on the same domain will match. In fact they may even match on the parts of the domain (e.g. 'edu').

$search_exp->add_field(
fields => [ $ds->field( $role.'_id' ) ],
value => $email,
);

The search expression should use EX so it only matches exactly:

$search_exp->add_field(
    fields => [ $ds->field( 'creators_id' ) ],
    value => $email,
    match => 'EX',
);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions