From f9aa09e2f6e35c7466aca374dc0a1299ca9cf283 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 21 Mar 2008 13:56:31 -0400 Subject: moved to a tip --- doc/index/discussion.mdwn | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'doc') diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index df4e57aba..3d17ddb2a 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -337,42 +337,6 @@ Clicking on an old "?" or going to a create link but new Markdown content exists ---- -# User database tools? - -Any tool to view user database? - -Any tool to edit the user database? - -> No, but it's fairly easy to write such tools in perl. For example, to -> list all users in the user database: - - joey@kodama:~/src/joeywiki/.ikiwiki>perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); print $_ foreach keys %$userinfo' - http://joey.kitenet.net/ - foo - -> To list each user's email address: - - joey@kodama:~/src/joeywiki/.ikiwiki>perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); print $userinfo->{$_}->{email} foreach keys %$userinfo' - - joey@kitenet.net - -> Editing is simply a matter of changing values and calling Storable::store(). -> I've not written actual utilities to do this yet because I've only needed -> to do it rarely, and the data I've wanted has been different each time. -> --[[Joey]] - ->> Thanks for these examples -- I have been using them. I don't know the ->> Storable yet. Can someone share an example of removing a user? (I now ->> setup account\_creation\_password and I have some spammer with different ->> login names that I have banned that I might as well remove from the ->> userdb.) - ->>> Let's see, you could do something like this: ->>> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); delete $$userinfo{"joey"}; Storable::lock_store($userinfo, "userdb")' ->>> I suppose I should stop being lame and create a command line tool wrapping up these operations.. --[[Joey]] - ----- - # Spaces in WikiLinks? Hello Joey, -- cgit v1.2.3