diff options
Diffstat (limited to 'USER')
-rw-r--r-- | USER/USER.xs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/USER/USER.xs b/USER/USER.xs index d1ef6c9..e7d9e60 100644 --- a/USER/USER.xs +++ b/USER/USER.xs @@ -250,7 +250,7 @@ lu_homedir_remove(const char *directory, struct lu_error ** error) return 0; } - return TRUE; + return 1; } /* Move a directory from one place to another. */ int @@ -528,18 +528,24 @@ Admin_UserAdd(self, ent, is_system, dont_create_home) } /* Create a mail spool for the user. */ - if (lu_mailspool_create_remove(self, ent, TRUE) != 1) { + if (lu_mailspool_create_remove(self, ent, 1) != 1) { warn(_("Error creating mail spool.\n")); - return 8; + RETVAL = 3; } } OUTPUT: RETVAL -void +int Admin_UserDel(self, ent) USER::ADMIN *self USER::ENT *ent + PPCODE: + USER__ERR *error; + if (lu_user_delete(self, ent, &error) == FALSE) { + croak("User Could Not be deleted: %s.\n", error ? error->string : "Unknown error"); + RETVAL = 0; + } else RETVAL = 1 ; void Admin_UserEdit(self, ent) @@ -641,7 +647,12 @@ void Admin_GroupDel(self, ent) USER::ADMIN *self USER::ENT *ent - + PPCODE: + USER__ERR *error; + if (lu_group_delete(self, ent, &error) == FALSE) { + croak("Group could not be deleted: %s.\n", error ? error->string : "Unknown error"); + RETVAL = 0; + } else RETVAL = 1 ; void Admin_GroupEdit(self, ent) USER::ADMIN *self |