Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
Only in a specific part of Users Perl module.

Using Perltidy - http://perltidy.sourceforge.net/
  • Loading branch information
dgdavid committed Feb 11, 2019
1 parent fc0b0b5 commit d112d94
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions src/modules/Users.pm
Expand Up @@ -3030,26 +3030,33 @@ sub AddUser {
# ----------------------------------------------------------------

# now copy the data to map of current user
foreach my $key (keys %data) {
if ($key eq "create_home" || $key eq "encrypted" ||
$key eq "chown_home" ||
$key eq "delete_home" || $key eq "no_skeleton" ||
$key eq "btrfs_subvolume" ||
$key eq "disabled" || $key eq "enabled") {
$user_in_work{$key} = YaST::YCP::Boolean ($data{$key});
}
elsif ($key eq "userPassword" && (defined $data{$key}) &&
# crypt password only once
!bool ($data{"encrypted"}))
{
$user_in_work{$key} = $self->CryptPassword ($data{$key}, $type);
$user_in_work{"encrypted"} = YaST::YCP::Boolean (1);
$user_in_work{"text_userpassword"} = $data{$key};
}
else {
$user_in_work{$key} = $data{$key};
}
foreach my $key ( keys %data ) {
if ( $key eq "create_home"
|| $key eq "encrypted"
|| $key eq "chown_home"
|| $key eq "delete_home"
|| $key eq "no_skeleton"
|| $key eq "btrfs_subvolume"
|| $key eq "disabled"
|| $key eq "enabled" )
{
$user_in_work{$key} = YaST::YCP::Boolean( $data{$key} );
}
elsif (
$key eq "userPassword"
&& ( defined $data{$key} )
&& !bool( $data{"encrypted"} ) # crypt password only once
)
{
$user_in_work{$key} = $self->CryptPassword( $data{$key}, $type );
$user_in_work{"encrypted"} = YaST::YCP::Boolean(1);
$user_in_work{"text_userpassword"} = $data{$key};
}
else {
$user_in_work{$key} = $data{$key};
}
}

$user_in_work{"type"} = $type;
$user_in_work{"what"} = "add_user";

Expand Down

0 comments on commit d112d94

Please sign in to comment.