$idCustomer]); $fingerPrintModel = new Fingerprint(); $fingerPrintModel->id_customer = $customer->id_customer; $fingerPrintModel->fingerprint = $fingerPrint; $fingerPrintModel->save(false); } /** * @param string the sha string of the fingerprint $fingerPrint * @return array the response * @throws HttpException on any error */ public function actionEnter($fingerPrint) { /** @var Fingerprint $fingerPrint */ $fingerPrint = Fingerprint::find()->andWhere(['fingerPrint' => $fingerPrint])->one(); if ( null === $fingerPrint) { throw new HttpException(404, 'Not Found'); } $customer = Customer::findOne($fingerPrint->id_customer); if ( null === $customer) { throw new HttpException(404, 'Not Found'); } return [ 'id_customer' => $customer->id_customer ]; } }