Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
ORCID Support
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Updating Creators Automatically=== With the ORCID Support Advance plugin installed, the only way ORCIDs can be added to the creators table is via an automatic lookup of the user's repository profile, where their authenticated ORCID should be stored following a successful connection to orcid.org. The trigger that carries out this lookup is found in <tt>z_orcid_support_advance.pl</tt> at the local archive level: <pre> # In: z_orcid_support_advance.pl # ... #automatic update of eprint creator field - orcid should be set to user's orcid value $c->add_dataset_trigger( 'eprint', EPrints::Const::EP_TRIGGER_BEFORE_COMMIT, sub { my( %args ) = @_; my( $repo, $eprint, $changed ) = @args{qw( repository dataobj changed )}; # ... # ... </pre> The lookup assumes that user emails are stored in the <tt>creators_id</tt> field and looks for a corresponding user profile based on this field's value: <pre> # In: z_orcid_support_advance.pl # ... my $email = $c->{id}; $email = lc($email) if defined $email; my $user = EPrints::DataObj::User::user_with_email($eprint->repository, $email); if( $user ) { if( EPrints::Utils::is_set( $user->value( 'orcid' ) ) ) #user has an orcid { #set the orcid $new_c->{orcid} = $user->value( 'orcid' ); } } # ... </pre> If your repository is configured differently however then you may need to adjust this lookup, e.g. if your repository stores usernames in 'creators_id': <pre> # In: z_orcid_support_advance.pl # ... my $username = $c->{id}; $username= lc($username) if defined $username; my $user = EPrints::DataObj::User::user_with_username($eprint->repository, $username); if( $user ) { if( EPrints::Utils::is_set( $user->value( 'orcid' ) ) ) #user has an orcid { #set the orcid $new_c->{orcid} = $user->value( 'orcid' ); } } </pre> Similarly, when a user first connects their user profile to orcid.org and the ORCID is added to their repository user account, a user commit trigger is called which will attempt to find all of the eprint records where that user is listed as a creator, and then commit those eprints so the new ORCID is pulled through. This trigger is also found in z_orcid_support_advance.pl and will need updating to ensure the lookup for a user's eprints, based on creators_id, is using the correct field.
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)