add card type : review
This commit is contained in:
parent
5a705f15b0
commit
0371b6e3ee
@ -40,13 +40,15 @@ class ActivatedFilter extends ActionFilter
|
|||||||
// find out if the device is activated
|
// find out if the device is activated
|
||||||
$activated = $mobileDevice->status === MobileDevice::STATUS_ACTIVE;
|
$activated = $mobileDevice->status === MobileDevice::STATUS_ACTIVE;
|
||||||
// override activated to true, if it is a reviewer card
|
// override activated to true, if it is a reviewer card
|
||||||
|
if (isset($idCard)) {
|
||||||
$card = Card::findOne($idCard);
|
$card = Card::findOne($idCard);
|
||||||
if ( isset($card) ){
|
if (isset($card)) {
|
||||||
if ( isset($card->type) ){
|
if (isset($card->type)) {
|
||||||
$activated = true;
|
$activated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// if device is not activated, throw exception with http status 412
|
// if device is not activated, throw exception with http status 412
|
||||||
if ($activated === false) {
|
if ($activated === false) {
|
||||||
throw new HttpException( HttpStatus::PRECONDITION_FAILED,"Device is not activated: " . $deviceId);
|
throw new HttpException( HttpStatus::PRECONDITION_FAILED,"Device is not activated: " . $deviceId);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user