Exclude current user in email notifications, pull-request #273)

This commit is contained in:
Frédéric Guillot
2014-09-19 22:08:04 +02:00
parent 9ffa63747a
commit 95e54d1d30
5 changed files with 95 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ namespace Model;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
use Core\Session;
/**
* User model
@@ -205,7 +206,7 @@ class User extends Base
$result = $this->db->table(self::TABLE)->eq('id', $values['id'])->update($values);
// If the user is connected refresh his session
if (session_id() !== '' && $_SESSION['user']['id'] == $values['id']) {
if (Session::isOpen() && $_SESSION['user']['id'] == $values['id']) {
$this->updateSession();
}