Make sure the user is connected

This commit is contained in:
Frederic Guillot 2015-04-11 23:18:15 -04:00
parent 1b5cbf5611
commit fd7a8a0780
1 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class Notification extends Base
public function getUsersList($project_id, array $exclude_users = array())
{
// Exclude the connected user
if (Session::isOpen()) {
if (Session::isOpen() && $this->userSession->isLogged()) {
$exclude_users[] = $this->userSession->getId();
}
@ -104,8 +104,8 @@ class Notification extends Base
$author = '';
if (Session::isOpen()) {
$author = e('%s via Kanboard', $this->user->getFullname($_SESSION['user']));
if (Session::isOpen() && $this->userSession->isLogged()) {
$author = e('%s via Kanboard', $this->user->getFullname($this->session['user']));
}
$mailer = Swift_Mailer::newInstance($this->container['mailer']);