Skip to content

Commit d6cc3a7

Browse files
committed
Fix reports of unidentified users in Sym 2.6+
Sym 2.6.0 introduced a new getter for the author, so the old Symphony::Engine()->Author was always null. Funny to see that I needed this feature as well in the couple of last commit, so we can already use Tracker::Author(); Re #37 Fixes #35 Fixes #34
1 parent e11c180 commit d6cc3a7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extension.driver.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,12 @@ public function parseLogin($context)
549549

550550
// Set author ID. If author doesn't exist, store the IP
551551
// address.
552-
if (Symphony::Engine()->Author) {
553-
if (!$this->validateUser(Symphony::Engine()->Author->get('id'))) {
552+
$author = Tracker::Author();
553+
if ($author) {
554+
if (!$this->validateUser($author->get('id'))) {
554555
return;
555556
}
556-
$account = Symphony::Engine()->Author->get('id');
557+
$account = $author->get('id');
557558
} else {
558559
$account = 0;
559560
$item = $_SERVER['REMOTE_ADDR'];

0 commit comments

Comments
 (0)