Skip to content

Commit

Permalink
Merge pull request #5212 from solgenomics/topic/another_load_people.p…
Browse files Browse the repository at this point in the history
…l_tweak

another tweak to load_people.pl
  • Loading branch information
lukasmueller authored Dec 6, 2024
2 parents 538b78c + 08ba70d commit 102a508
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions bin/load_people.pl
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ =head1 DESCRIPTION
research_keywords
research_interests
webpage
password
The first four columns listed are required.
The first four columns listed are required. If no password is provided the system will create one.
The script outputs the username, first_name, last_name, email and assigned initial random password. This can be used to send the password to the user.
The script outputs the username, first_name, last_name, email and assigned initial random password. This can be used to send the password to the user.
=head1 AUTHOR
Expand Down Expand Up @@ -102,7 +103,7 @@ =head1 AUTHOR

my $dbh = CXGN::DB::InsertDBH->new( { dbhost=>$dbhost,
dbname=>$dbname,
dbargs => {AutoCommit => 0,
dbargs => {AutoCommit => 1,
RaiseError => 1}
}
);
Expand Down Expand Up @@ -201,7 +202,15 @@ =head1 AUTHOR
# next();
# }

my $password =Crypt::RandPasswd->word( 8 , 8 );
my $password;

if ($data{password}) {
$password = $data{password};
}
else {
$password =Crypt::RandPasswd->word( 8 , 8 );
}

if ($data{username}) {
my $login = CXGN::People::Login->new($dbh);

Expand Down

0 comments on commit 102a508

Please sign in to comment.