Skip to content

Commit

Permalink
for mfa verification don't require validation for updating last login
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Sep 11, 2024
1 parent a5bf389 commit 2deed4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion application/features/bootstrap/MfaContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Sil\SilIdBroker\Behat\Context;

use Behat\Gherkin\Node\TableNode;
use common\models\EmailLog;
use common\models\Mfa;
use common\models\MfaBackupcode;
use common\models\MfaWebauthn;
Expand Down
4 changes: 2 additions & 2 deletions application/frontend/controllers/MfaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function actionCreate()
* @throws TooManyRequestsHttpException
* @return null
*/
public function actionVerify(int $id, string $type = "")
public function actionVerify(int $id, string $type = ""): Mfa
{
$req = \Yii::$app->request;
$value = $req->getBodyParam('value');
Expand Down Expand Up @@ -116,7 +116,7 @@ public function actionVerify(int $id, string $type = "")
}
$mfa->loadData($rpOrigin);
$user->last_login_utc = MySqlDateTime::now();
if (!$user->save()) {
if (!$user->save(false)) {
\Yii::error([
'action' => 'save last_login_utc for user after mfa verification',
'status' => 'error',
Expand Down

0 comments on commit 2deed4c

Please sign in to comment.