All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 73303982 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add a little utility function for remapping WikiNames to new uids.

No big deal ...
parent 670800ea
......@@ -103,6 +103,9 @@ elsif ($action eq "setgroups") {
elsif ($action eq "xlogin") {
exit(WikixLogin(@ARGV));
}
elsif ($action eq "remap") {
exit(WikiRemap(@ARGV));
}
else {
die("*** $0:\n".
" Do not know what to do with '$action'!\n");
......@@ -754,6 +757,32 @@ sub WikixLogin(@)
return 0;
}
#
# Remap user.
#
sub WikiRemap(@)
{
usage()
if (@_ != 2);
my ($user, $wikiname) = @_;
#
# Remap user in the user map.
#
dbmopen(%MAPDB, $USERMAPDB, 0644) or
fatal("Cannot open $USERMAPDB: $!");
print "Current mapping is ". $MAPDB{$user} . "\n";
$MAPDB{$user} = $wikiname;
# Write the DB back out.
dbmclose(%MAPDB);
return 0;
}
sub fatal($)
{
my($mesg) = $_[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment