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:
parent
dd6c492016
commit
fb3c85fdd2
1 changed files with 4 additions and 2 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue