<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Martin,</p>
<p>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: <br>
</p>
<p><a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdrn.eprints-hosting.org%2Fstuff%2Fremove_users&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=0Mnswe8v3sXtQINQXCYueNDXu%2B0zhrOIkAmQmhsEJf4%3D&reserved=0" originalSrc="http://drn.eprints-hosting.org/stuff/remove_users" shash="j9BAg09BSq5XaZnTRaNVwf5ZidLxO88c3hNJeNBFgdOz2iLoJiT0/85/F8ccHWzF7Xe6KnbftRbbpBhaHkFoXVeagU5Me5Tr89jRaJXoMGEwQ6iZXbModdsM90IcSjJbQ3DwvzfATWPjHn8DSYipcisqF1+VoeEVX4QCREkDGI0=">http://drn.eprints-hosting.org/stuff/remove_users</a> <br>
</p>
<p>You will need to put this in the bin directory of your archive,
make it executable and run as follows:</p>
<p>./remove_users ARCHIVE_NAME USER_LIST_FILENAME</p>
<p>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.</p>
2<br>
5<br>
7<br>
11<br>
28
<p>Regards</p>
<p>David Newman<br>
</p>
<div class="moz-cite-prefix">On 12/05/2020 10:06, Martin Hawksey via
Eprints-tech wrote:<br>
</div>
<blockquote type="cite" cite="mid:EMEW3|af21713e03e00c1c4b4685aac358d127w4BA8Y14eprints-tech-bounces|ecs.soton.ac.uk|CAMKPGpVYEM7xmufsAAearHuOr8_uSDdDvke1v01osAXWK6R=cQ@mail.gmail.com">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>I've looked on the wiki and more widely for a solution and
I can find some snippets like <a href="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" originalSrc="https://wiki.eprints.org/w/API:EPrints/DataObj/User#remove" shash="kxgldrfsD4ZUws5HQU93PP+8DU/ID6Pdl+g8UOMjQBbRe6qjx5fe69fmTpNaq4vpRsp9ZJHvfF5Sr1y32mjJ3IYT7cBj3jqWK8DC7YJ+gzBn2G1oQc+sksE7RsVNVxEFdIWa46WHltuOZacXPqwrYtXljvF7DXFWm5O4LIKLvW4=" originalsrc="https://wiki.eprints.org/w/API:EPrints/DataObj/User#remove" shash="jcj7EvTneQhwGrASec/jlFIgtVP9t9f8C1QJdHG0xlE0cykhA/vFYvRJpxsbLW4KDnwHDAgEAONYXdvRyA+raA4k8pW169Bph+Ze8n/0pYFMl3oGm4ZGMIPK4lN9hHm9fHQU7hcX98WlSSEKkEJAYGM2G7JBpb8xnq9G8BSZR7s=" moz-do-not-send="true">https://wiki.eprints.org/w/API:EPrints/DataObj/User#remove</a>
</div>
<div><br>
</div>
<div>I was wondering if anyone on the list has had to go through
a similar process and has a script they can share?</div>
<div><br>
</div>
<div>Many thanks</div>
<div>Martin</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=jUeV8BYqMCes%2BZN89lZHdCCYMV83c9KZnq2Kwq6s9V0%3D&reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="wATKobpSoefWFqQhdDgaOSj2f7YNuGpI+jvlaQFOLbNtuGCMCQOMHnLEGSJql/dI9DWtCqae7BL/WWOn9uRdJNhZyDhacSY7h2Fx9Zor4XOvOYhSa6JPFi7ohxBEoLkShMzA9d2jvJyjRh5lDNIHVEp9neS1xmF1jaNMvUi60FI=">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=QcgZjgGQr8EXUHQoPZlw6pPKGgQ6nCszgbr9XFNv%2BCI%3D&reserved=0" originalSrc="http://wiki.eprints.org/" shash="OuZN6YO5722AG4bybI00SinJ/9j3TGYPfYgYxvf+YGNe2bxMu7TyIwy8q8Prg/DBGc3KvpYEa9ggY1pphAhmUN1AKf6PHyPjw7V2g9oRu1/VYKpFUJS+1DCpAF/0VsN1+lxsqLR0dj+HR5wLjN2BWrNxtlYtlDkbYS1XRQi96CI=">http://wiki.eprints.org/</a></pre>
</blockquote>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
        <tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=m%2BIseMp8KG%2FZ3nm8Rt94uMSBFfpnXFC8%2BinCoH62FOA%3D&reserved=0" originalSrc="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" shash="CjA+x69CUs+9wW8OHMeSPk4o0Wc9vb+DDhgu4iBZzw9fJ6bRSkbbJuqWWcshlQd4axIEiOrs35CZwc/+KRPMiqOQmj8lz9jFGXQ2HQvu8mYmJIHrPHJUfsrq9CA5yINiXqz70HrVyVEP1ogiUR331ta3jostfrXqzdJNGmBqO2A=" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=m%2BIseMp8KG%2FZ3nm8Rt94uMSBFfpnXFC8%2BinCoH62FOA%3D&reserved=0" originalSrc="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" shash="CjA+x69CUs+9wW8OHMeSPk4o0Wc9vb+DDhgu4iBZzw9fJ6bRSkbbJuqWWcshlQd4axIEiOrs35CZwc/+KRPMiqOQmj8lz9jFGXQ2HQvu8mYmJIHrPHJUfsrq9CA5yINiXqz70HrVyVEP1ogiUR331ta3jostfrXqzdJNGmBqO2A=" target="_blank" style="color: #4453ea;">www.avg.com</a>
                </td>
        </tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>