Purge Table 'xf_sv_multiple_account_token' on user deletion?

nocte

Member
Reactions
5
I got this error when trying to register on my local test system:
Code:
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '17-1' for key 'active' src/XF/Db/AbstractStatement.php:217

INSERT  INTO `xf_sv_multiple_account_token` (`user_id`, `active`, `token`, `token_id`, `token_date`) VALUES (?, ?, ?, ?, ?)
I suppose there was something wrong with my database (user_id auto increment) after deleting the latest registered user. Don't know how this could happen..

Anyway, shouldn't the table xf_sv_multiple_account_token (and maybe more tables) be purged too on user deletion? At the moment just xf_sv_user_registration_log is purged.
 
It needs to be kept around so it can detect when a multi-account is associated with a deleted user (I need to display it better).

The user-id absolutely shouldn't be re-used, so this shouldn't happen in a live environment.
 
The user-id absolutely shouldn't be re-used, so this shouldn't happen in a live environment.
sure. The strange thing is: There was actually no new user created - I just got the error that I have posted above. Or do entries in xf_user get auto-deleted if registration fails? 🤔 It's hard to say what how the database structure was before the registration attempt. :(
It needs to be kept around so it can detect when a multi-account is associated with a deleted user (I need to display it better).
Nice, was not aware of this feature. But for privacy (legal) reasons it would be fine if you could add an option to delete all data on user deletion.
 

Users who are viewing this thread

Back
Top