aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-15 11:42:03 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-15 11:42:03 +0000
commit7b33e91bf7fef8764af19081a9ad69b3a7df9221 (patch)
tree369234641c20e3933343a11325bd52d2acf27d73
parent831eea803ed357a55ac8d47bda50ac3e88057224 (diff)
downloaduserdrake-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-xuserdrake4
1 files changed, 2 insertions, 2 deletions
diff --git a/userdrake b/userdrake
index 9004b06..9fa7ade 100755
--- a/userdrake
+++ b/userdrake
@@ -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});