diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-07-15 11:42:03 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-07-15 11:42:03 +0000 |
commit | 7b33e91bf7fef8764af19081a9ad69b3a7df9221 (patch) | |
tree | 369234641c20e3933343a11325bd52d2acf27d73 | |
parent | 831eea803ed357a55ac8d47bda50ac3e88057224 (diff) | |
download | userdrake-7b33e91bf7fef8764af19081a9ad69b3a7df9221.tar userdrake-7b33e91bf7fef8764af19081a9ad69b3a7df9221.tar.gz userdrake-7b33e91bf7fef8764af19081a9ad69b3a7df9221.tar.bz2 userdrake-7b33e91bf7fef8764af19081a9ad69b3a7df9221.tar.xz userdrake-7b33e91bf7fef8764af19081a9ad69b3a7df9221.zip |
don't do useless things or show useless dialog if an error has been
raised in AddUser
-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}); |