Changeset 20729


Ignore:
Timestamp:
2009-09-28T15:01:50+13:00 (15 years ago)
Author:
kjdon
Message:

uncommented alreadyencrypted option, as it appears to be implemented. added groups to the line in csv, ie now username,password,groups,comment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/csv-usernames-to-db.pl

    r20572 r20729  
    6767    'deft' => ",",
    6868    'reqd' => "no" },
    69 # Not currently supported
    70 #      { 'name' => "alreadyencrypted",
    71 #   'desc' => "{cu2db.already-encrypted}",
    72 #   'type' => "flag",
    73 #   'reqd' => "no" },
     69      { 'name' => "alreadyencrypted",
     70    'desc' => "{cu2db.already-encrypted}",
     71    'type' => "flag",
     72    'reqd' => "no" },
    7473      { 'name'  => "verbosity",
    7574    'desc'  => "{scripts.verbosity}",
     
    138137    while (defined ($line = <FIN>)) {
    139138    chomp $line;
    140     my ($username,$password,$comment) = split(/$fieldseparator/,$line);
     139    my ($username,$password,$groups,$comment) = split(/$fieldseparator/,$line);
    141140   
    142141    if (!$alreadyencrypted) {
     
    147146    print DBOUT "<comment>$comment\n";
    148147    print DBOUT "<enabled>true\n";
    149 #       print DBOUT "<groups>administrator,all-collections-editor,colbuilder\n";
    150     print DBOUT "<groups>dairywomen\n";
     148    print DBOUT "<groups>$groups\n";
    151149    print DBOUT "<password>$password\n";
    152150    print DBOUT "<username>$username\n";
Note: See TracChangeset for help on using the changeset viewer.