When using only a groupId in create, the code assumed that the call also intended to use a userId, which it acquired from $session->user->userId.

This caused group type administrative notices to also go to the initial user.
This commit is contained in:
Stephen Opal 2009-01-29 17:36:36 +00:00
parent dd6c492016
commit fb3c85fdd2

View file

@ -109,10 +109,12 @@ sub create {
$self->{_properties}{subject} = $properties->{subject} || WebGUI::International->new($session)->get(523);
$self->{_properties}{message} = $properties->{message};
$self->{_properties}{dateStamp} = time();
$self->{_properties}{userId} = $properties->{userId} || $session->user->userId;
$self->{_properties}{userId} = $properties->{userId};
$self->{_properties}{groupId} = $properties->{groupId};
$self->{_properties}{sentBy} = $properties->{sentBy} || 3;
unless ( $self->{_properties}{userId} || $self->{_properties}{groupId} ) {
$self->{_properties}{userId} = $session->user->userId;
}
my $status = $self->{_properties}{status};
if ($status eq "completed") {