Sorry, there's a mistake in the script above. Here is the correct one
hm = ctx.getHierarchyManager('users')
users = hm.getContent('/admin').getChildren('mgnl:user')
count = 0
users.eachWithIndex { user, i ->
println "Deleting user $user.name..."
user.delete()
count++
if(i % 100 == 0)
hm.save()
}
return "Done deleting $count users."
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=a3744c5e-e62a-40ad-a69c-abe88ecbbc27
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------