born05 / craft-twofactorauthentication

Craft plugin for two-factor or two-step login using Time Based OTP.
MIT License
36 stars 26 forks source link

Integrity constraint violation #29

Closed rinusvandam closed 5 years ago

rinusvandam commented 5 years ago

I have a website running two-factor authentication.

When I click the disable 2FA in the back-end for a user I get the following error:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (passwordprotectedwebsite.twofactorauthentication_session, CONSTRAINTtwofactorauthentication_session_sessionId_fkFOREIGN KEY (sessionId) REFERENCESsessions(id) ON DELETE CASCADE) The SQL being executed was: INSERT INTOtwofactorauthentication_session(userId,sessionId,dateVerified,dateCreated,uid,dateUpdated) VALUES (3, 0, '2019-02-28 12:06:45', '2019-02-28 12:06:45', 'f1410a70-0a99-41bf-8af9-f8c59de7c492', '2019-02-28 12:06:45')

I'm running:

roelvanhintum commented 5 years ago

Fixed in 2.1.1

rinusvandam commented 5 years ago

Wow that's fast. Thanks!