add card type : review

This commit is contained in:
Schneider Roland 2022-12-01 20:53:50 +01:00
parent 5a705f15b0
commit 0371b6e3ee

View File

@ -40,11 +40,13 @@ class ActivatedFilter extends ActionFilter
// find out if the device is activated
$activated = $mobileDevice->status === MobileDevice::STATUS_ACTIVE;
// override activated to true, if it is a reviewer card
$card = Card::findOne($idCard);
if ( isset($card) ){
if ( isset($card->type) ){
$activated = true;
}
if (isset($idCard)) {
$card = Card::findOne($idCard);
if (isset($card)) {
if (isset($card->type)) {
$activated = true;
}
}
}
}
// if device is not activated, throw exception with http status 412