[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Removing all user accounts with no deposits

Hi Martin,

Yes, this is the correct method for deleting users if they have no 
deposits.? If they did, I would recommend transferring ownership of 
deposits before removing a user.? I am assuming you have quite a long 
list so you cannot go the "Manage Records -> Users -> Remove" option 
would be overly time consuming. Therefore you need will need to write a 
somewhat bespoke script for doing this, like the one at:


You will need to put this in the bin directory of your archive, make it 
executable and run as follows:


Substitute ARCHIVE_NAME for your archive's name and USER_LIST_FILENAME 
for the filename(and path) or a file containing new line separated user 
IDs, e.g.



David Newman

On 12/05/2020 10:06, Martin Hawksey via Eprints-tech wrote:
> Hello all,
> Sorry to join the list with what is probably a noob question. Our 
> eprints repo has a number of spam accounts and we would like to remove 
> all user accounts with no live deposits. Via the deposit and user 
> reporting I'm happy I can create a list of user id's for removal but 
> then I reach the limits of my understanding,?not being a Perl user/dev.
> I've looked on the wiki and more widely for a solution and I can find 
> some snippets like 
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FDataObj%2FUser%23remove&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=1t%2Bu4IW3jyuYBblxs6fCs3zxGKcfbF8FPn0nCXONZpI%3D&reserved=0 
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FDataObj%2FUser%23remove&amp;data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=1t%2Bu4IW3jyuYBblxs6fCs3zxGKcfbF8FPn0nCXONZpI%3D&amp;reserved=0> 
> I was wondering if anyone on the list has had to go through a similar 
> process and has a script they can share?
> Many thanks
> Martin
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=jUeV8BYqMCes%2BZN89lZHdCCYMV83c9KZnq2Kwq6s9V0%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=QcgZjgGQr8EXUHQoPZlw6pPKGgQ6nCszgbr9XFNv%2BCI%3D&amp;reserved=0

This email has been checked for viruses by AVG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200512/1e2e280f/attachment.html