From caf8e29852930af1e81c6bd7e8bb7db715e3d746 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Mon, 8 Jun 2015 11:20:46 +0200 Subject: [PATCH] Avoid usage of facade in user model --- framework/core/src/Core/Models/User.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/core/src/Core/Models/User.php b/framework/core/src/Core/Models/User.php index 131530b83..a57288bfc 100755 --- a/framework/core/src/Core/Models/User.php +++ b/framework/core/src/Core/Models/User.php @@ -3,7 +3,6 @@ use Illuminate\Contracts\Hashing\Hasher; use Tobscure\Permissible\Permissible; use Flarum\Core\Formatter\FormatterManager; -use Flarum\Core\Exceptions\InvalidConfirmationTokenException; use Flarum\Core\Events\UserWasDeleted; use Flarum\Core\Events\UserWasRegistered; use Flarum\Core\Events\UserWasRenamed; @@ -323,7 +322,7 @@ class User extends Model ->whereIn('type', array_filter($types, [$this, 'shouldAlert'])) ->where('time', '>', $this->notification_read_time ?: 0) ->where('is_read', 0) - ->count(\DB::raw('DISTINCT type, subject_id')); + ->count($this->getConnection()->raw('DISTINCT type, subject_id')); } public function getPreferencesAttribute($value)