[EP-tech] Re: Cleaning database up

David Whitehead dwhitehead at lincoln.ac.uk
Wed Feb 6 15:17:05 GMT 2013


Hi Seb,

thanks for your help Seb you'v given me some great information about the API's. I just had one last question I wanted to ask you about the EPrint API's, once the database has been somewhat cleaned via the script, I am looking to change userid's into a different value for the university which makes more sense then the auto increment method, I have already written the ldap script and database file changes to do this but I need to modify the existing users already in the database to the same structure. Is there any Eprint API which would allow me to update a users userid and then trickle it down into their EPrints, saved searches, indexs etc?

Kind regards,

David Whitehead


-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk on behalf of Sebastien Francois
Sent: Wed 06/02/2013 15:01
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: Cleaning database up
 
David,

On 06/02/13 14:46, David Whitehead wrote:
> Hi Seb,
>
> The script I was thinking of doing would check whether a user has EPrints and if so would not remove them, along with certain criteria such as if they joined in 2013 don't remove them etc. thanks for the script you mentioned I really appreciated it :), by using the EPrint API would it go and purge the database correctly based on a deletion?

# does user have eprints? add the following to the previous script:

return if( $user->get_eprints->count > 0 );

Not sure what field you're using for the join date so I let you do this.

And yes, using the API would remove associated saved searches and clean 
up all the relevant tables (indexes etc).

Seb

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/


The University of Lincoln - a top performer in student satisfaction, enjoying an unrivalled ascent through the University league tables, set in a dynamic, research rich and vibrant campus in the heart of a great historic student-friendly city.

The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies.
 
Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions.
 
The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at: http://www.lincoln.ac.uk/legal.


More information about the Eprints-tech mailing list