aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xuserdrake6
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 6b378d8..7155e5b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- do not crash when trying to rename a user to an already existing name
- make libuser binding i18n aware
- refactorization for readability (please test)
- use libuser translations
diff --git a/userdrake b/userdrake
index fa1a101..b8af2b2 100755
--- a/userdrake
+++ b/userdrake
@@ -1154,7 +1154,11 @@ sub Edit() {
Gtk2::Button->new($_->[0]), clicked => sub {
if (!$retv) {
if ($p <= 0) {
- UserEdit_valid($userEnt, $model, $primgid);
+ eval { UserEdit_valid($userEnt, $model, $primgid) };
+ if (my $err = $@) {
+ c::set_tagged_utf8($err);
+ RaiseError(N("An error occurred:") . "\n" . $err);
+ }
} elsif ($p == 1) {
GroupEdit_valid($groupEnt, $model, $groupname);
}