Adding revisions/versioning to user accounts is something which should be easier in D7, since we now have user fields, which support versioning if the bundle supports it. Outside the core user properties, this means adding revision support would cost us little.
Functionality-wise, this would mean a much better ability for sites, notably ones with a user moderation process, to keep track of user changes history, with the ability to rollback unapproved changes in an obvious fashion, by just reapplying a previous revision, like for nodes.
It could also slightly reduce the table with of users: user->init could now just be user->mail for the initial revision of the user account. This being a rarely user property, it wouldn't need to be loaded every time. Add an int (uvid column), drop a varchar (init column).
Much like nodes, most builtin (non-field) could be kept by-user-revision, with only basic (probably uid, uvid, name, changed, status) fields remaining in users and all other non-fielded properties going into users_revisions, or possibly migrating to fields : picture, for instance, does not seem a really obvious requirement for an always present user property, and would gain from being a field. Video avatars instead of plain old static ones, anyone ?
I'm willing to work on it starting immediately, to try getting this in before code freeze, but before committing (significant) work on it, I'd like to know how others feel about it.
Comments
Comment #1
swentel CreditAttribution: swentel commentedI'm all in for this, although I'm not sure if we can get this in before the code freeze .. haven't analyzed it completely so I'm not sure. Maybe the best approach would be to start with small features (ie, changed field, uvid etc) and a contrib can easily do the job for D7 ?
Comment #2
fgmWell, I've started with small things, as you suggest, based on D7U8:
I still need to add the user update/deletion logic and I should have a patch to roll. Maybe this week, but alas I'm on holiday which means less time.
Additional ideas once the dust settles:
Comment #3
attiks CreditAttribution: attiks commentedA client is asking us the same, so
- Do you have a (partial) patch, so I can start from there?
- Any chance we can get this in Drupal 7.1, or is this D8?
Comment #4
fgmNothing currently. I started on it, then cut back on the functionality to have things on D6, and it ended as just a moderation process for user "fields".
A 7.x implementation would have to be Fields-based, but the need certainly remains.
Comment #5
attiks CreditAttribution: attiks commentedI started building this for D7 as a contrib module, status so far is that revision is working on {users} fields and on attached fields, next up as a UI link node revisions have.
Comment #6
attiks CreditAttribution: attiks commentedProject created, see http://drupal.org/project/user_revision
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commentedFeature requests should be assigned to D8.
Comment #8
attiks CreditAttribution: attiks commenteddamien, hence the new project ;p
Comment #9
attiks CreditAttribution: attiks commentedFYI: first dev version added, feel free to provide feedback.
Comment #10
LarsKramer CreditAttribution: LarsKramer commentedThere is a related issue about revision support for taxonomy: http://drupal.org/node/59429
Comment #11
Jelle_Ssubscribing
Comment #12
tutumlum CreditAttribution: tutumlum commentedsubscribing
Comment #17
dpiComment #20
geek-merlinNew Entity Update API for converting the schema of a content entity type, with or without pre-existing data | Drupal.org
Comment #21
geek-merlinI have the user_revision in use on a contrib site, but not too many people use it. Installation of the module is currently blocked by #3049787: Leverage EntityUpdate API (without this installing via web can lead to timeout and data loss). So if anyone want to help there, this is appreciated a lot.
Comment #27
sukanya.ramakrishnan CreditAttribution: sukanya.ramakrishnan commentedAny update on this ticket ? Do we have a roadmap for making the user entity revisionable?
Thanks,
Sukanya
Comment #28
zenimagine CreditAttribution: zenimagine commented