From 8d5a782a9f0add94e40aa974283ee52fa975e641 Mon Sep 17 00:00:00 2001 From: Shohrat Date: Tue, 3 Oct 2023 17:13:49 +0500 Subject: [PATCH] scopes --- plugins/rainlab/user/models/User.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/rainlab/user/models/User.php b/plugins/rainlab/user/models/User.php index 870543b..ead3372 100644 --- a/plugins/rainlab/user/models/User.php +++ b/plugins/rainlab/user/models/User.php @@ -105,10 +105,6 @@ class User extends UserBase public static $loginAttribute = null; - public function scopeIsFeatured($query) - { - return $query->where('is_featured', 1)->where('type', '!=', 'simple'); - } /** * Sends the confirmation email to a user, after activating. * @param string $code @@ -264,6 +260,11 @@ class User extends UserBase return $query->where('is_activated', 1); } + public function scopeIsFeatured($query) + { + return $query->where('is_featured', 1)->where('type', '!=', 'simple'); + } + /** * scopeFilterByGroup */