You are here

function user_revision_delete in User Revision 7

Same name and namespace in other branches
  1. 7.2 user_revision.module \user_revision_delete()

Delete a user revision.

Parameters

object $revision: The revision to delete, should have at least uid and vid.

2 calls to user_revision_delete()
user_revision_delete_confirm_submit in ./user_revision.pages.inc
Delete a revision.
user_revision_user_delete in ./user_revision.module
Implements hook_user_delete().

File

./user_revision.module, line 489
Enables user revision.

Code

function user_revision_delete($revision) {
  db_delete('user_revision')
    ->condition('uid', $revision->uid)
    ->condition('vid', $revision->vid)
    ->execute();
  module_invoke_all('user_revision_delete', $revision);
  field_attach_delete_revision('user', $revision);
  return TRUE;
}