Quantcast
Channel: ProjeQtOr free project management software - ProjeQtOr free project management software - Recent Topics - ProjeQtOr
Viewing all articles
Browse latest Browse all 6784

Notifications are going to the wrong person - by: burgerzs

$
0
0
In version 8.2.2 notifications are sent to the wrong person.

In Notification.php in the save function if it is a new notification, then it overwrites the idUser that is set in NotificationDefinition.php.
I changed this part as follows, if idUser and IdResource is set, then it won't overwrite:
if (is_null($this->id)) {
// Inits the status to unread
$this->idStatusNotification = 1;
// Inits creationDate with today
$this->creationDateTime=date('Y-m-d H:i:s');
// idUser is in fact the receiver
if (is_null($this->idUser)){$this->idUser = $this->idResource;}
// idResource = connected user ==> $userId
if (is_null($this->idResource)){$this->idResource = $userId;}
}

Viewing all articles
Browse latest Browse all 6784

Trending Articles