has card
This commit is contained in:
@ -9,6 +9,7 @@ use kernel\helpers\Debug;
|
||||
use kernel\app_modules\card\models\Card;
|
||||
use kernel\FormModel;
|
||||
use kernel\helpers\ImageGD;
|
||||
use kernel\modules\user\models\User;
|
||||
|
||||
class CardService
|
||||
{
|
||||
@ -105,4 +106,14 @@ class CardService
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function userHasCard(int $userId): bool
|
||||
{
|
||||
$card = Card::where("user_id", $userId)->first();
|
||||
if ($card){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user