[Rt-commit] rt branch, 4.2/user-set-disabled-error, created. rt-4.0.8-568-g4763d9c
Ruslan Zakirov
ruz at bestpractical.com
Fri Nov 23 08:22:28 EST 2012
The branch, 4.2/user-set-disabled-error has been created
at 4763d9cdac82bbe2841b444ff1a2dd7abaa27eb6 (commit)
- Log -----------------------------------------------------------------
commit 4763d9cdac82bbe2841b444ff1a2dd7abaa27eb6
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri May 27 22:54:58 2011 +0400
return error message when we fail to set disabled
diff --git a/lib/RT/User.pm b/lib/RT/User.pm
index f0a39be..176d30c 100644
--- a/lib/RT/User.pm
+++ b/lib/RT/User.pm
@@ -1061,11 +1061,11 @@ sub SetDisabled {
}
$RT::Handle->BeginTransaction();
- my $set_err = $self->PrincipalObj->SetDisabled($val);
- unless ($set_err) {
+ my ($status, $msg) = $self->PrincipalObj->SetDisabled($val);
+ unless ($status) {
$RT::Handle->Rollback();
$RT::Logger->warning(sprintf("Couldn't %s user %s", ($val == 1) ? "disable" : "enable", $self->PrincipalObj->Id));
- return (undef);
+ return ($status, $msg);
}
$self->_NewTransaction( Type => ($val == 1) ? "Disabled" : "Enabled" );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list