diff options
-rwxr-xr-x | userdrake | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -321,14 +321,14 @@ sub AddUser { if ($u{passwd} ne $us->{o}{confpasswd}->get_text) { RaiseError(N("Password Mismatch")) }; if ($sec{SECURE_LEVEL} > 3 && length($u{passwd}) < 6) { RaiseError(N("This password is too simple. \n Good passwords should be > 6 characters")) }; !$error and my $userEnt = $ctx->InitUser($u{username}, $is_system); - if ($us->{o}{createhomedir}->get_active) { + if (!$error && $us->{o}{createhomedir}->get_active) { $dontcreatehomedir = 0; $u{homedir} = $us->{o}{homedir}->get_text; $userEnt and $userEnt->HomeDir($u{homedir}); } else { $dontcreatehomedir = 1 } - if ($us->{o}{userid}->get_active) { + if (!$error && $us->{o}{userid}->get_active) { if (($u{uid} = $us->{o}{uid}->get_value) < 500) { my $uidchoice = GimmeChoice(N("User Uid is < 500"), N("Creating a user with a UID less than 500 is not recommended.\n Are you sure you want to do this?\n\n")); $uidchoice and $userEnt->Uid($u{uid}); |